Share via


OpenApiResponse Class

Definition

Response object.

public class OpenApiResponse : Microsoft.OpenApi.Interfaces.IEffective<Microsoft.OpenApi.Models.OpenApiResponse>, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable
type OpenApiResponse = class
    interface IOpenApiSerializable
    interface IOpenApiElement
    interface IOpenApiReferenceable
    interface IOpenApiExtensible
    interface IEffective<OpenApiResponse>
Public Class OpenApiResponse
Implements IEffective(Of OpenApiResponse), IOpenApiExtensible, IOpenApiReferenceable
Inheritance
OpenApiResponse
Implements

Constructors

OpenApiResponse()

Parameterless constructor

OpenApiResponse(OpenApiResponse)

Initializes a copy of OpenApiResponse object

Properties

Content

A map containing descriptions of potential response payloads. The key is a media type or media type range and the value describes it.

Description

REQUIRED. A short description of the response.

Extensions

This object MAY be extended with Specification Extensions.

Headers

Maps a header name to its definition.

Links

A map of operations links that can be followed from the response. The key of the map is a short name for the link, following the naming constraints of the names for Component Objects.

Reference

Reference pointer.

UnresolvedReference

Indicates if object is populated with data or is just a reference to the data

Methods

GetEffective(OpenApiDocument)

Returns an effective OpenApiRequestBody object based on the presence of a $ref

SerializeAsV2(IOpenApiWriter)

Serialize OpenApiResponse to Open Api v2.0.

SerializeAsV2WithoutReference(IOpenApiWriter)

Serialize to OpenAPI V2 document without using reference.

SerializeAsV3(IOpenApiWriter)

Serialize OpenApiResponse to Open Api v3.0.

SerializeAsV3WithoutReference(IOpenApiWriter)

Serialize to OpenAPI V3 document without using reference.

Extension Methods

Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

ResolveReference(IOpenApiReferenceable, JsonPointer)

Resolves a JSON Pointer with respect to an element, returning the referenced element.

Applies to