Share via


OpenApiRequestBodyReference Class

Definition

Request Body Object Reference.

public class OpenApiRequestBodyReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder<Microsoft.OpenApi.OpenApiRequestBody,Microsoft.OpenApi.IOpenApiRequestBody,Microsoft.OpenApi.OpenApiReferenceWithDescription>, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IShallowCopyable<Microsoft.OpenApi.IOpenApiRequestBody>
type OpenApiRequestBodyReference = class
    inherit BaseOpenApiReferenceHolder<OpenApiRequestBody, IOpenApiRequestBody, OpenApiReferenceWithDescription>
    interface IOpenApiRequestBody
    interface IOpenApiDescribedElement
    interface IOpenApiElement
    interface IOpenApiReadOnlyExtensible
    interface IShallowCopyable<IOpenApiRequestBody>
    interface IOpenApiReferenceable
    interface IOpenApiSerializable
Public Class OpenApiRequestBodyReference
Inherits BaseOpenApiReferenceHolder(Of OpenApiRequestBody, IOpenApiRequestBody, OpenApiReferenceWithDescription)
Implements IOpenApiRequestBody, IShallowCopyable(Of IOpenApiRequestBody)
Inheritance
Implements

Constructors

Name Description
OpenApiRequestBodyReference(String, OpenApiDocument, String)

Constructor initializing the reference object.

Properties

Name Description
Content

REQUIRED. The content of the request body. The key is a media type or media type range and the value describes it. For requests that match multiple keys, only the most specific key is applicable. e.g. text/plain overrides text/*

Description

Long description for the example. CommonMark syntax MAY be used for rich text representation.

Extensions

Specification extensions.

RecursiveTarget

Gets the recursively resolved target object.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
Reference

Reference object.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
Required

Determines if the request body is required in the request. Defaults to false.

Target

Gets the resolved target object.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
UnresolvedReference

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

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)

Methods

Name Description
ConvertToBodyParameter(IOpenApiWriter)

Converts the request body to a body parameter in preparation for a v2 serialization.

ConvertToFormDataParameters(IOpenApiWriter)

Converts the request body to a set of form data parameters in preparation for a v2 serialization.

CopyReference(OpenApiReferenceWithDescription)

Copy the reference as a target element with overrides.

CopyReference(V)

Copy the reference as a target element with overrides.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
CopyReferenceAsTargetElementWithOverrides(IOpenApiRequestBody)

Copy the reference as a target element with overrides.

CopyReferenceAsTargetElementWithOverrides(U)

Copy the reference as a target element with overrides.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
CreateShallowCopy()

Create a shallow copy of the current instance.

SerializeAsV2(IOpenApiWriter)

Serialize Open API element to v2.0.

SerializeAsV3(IOpenApiWriter)

Serialize Open API element to v3.0.

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
SerializeAsV31(IOpenApiWriter)

Serialize OpenAPI element into v3.1

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)
SerializeAsV32(IOpenApiWriter)

Serialize OpenAPI element into v3.2

(Inherited from BaseOpenApiReferenceHolder<T,U,V>)

Extension Methods

Name Description
Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to