Share via


IOpenApiRequestBody Interface

Definition

Defines the base properties for the request body object. This interface is provided for type assertions but should not be implemented by package consumers beyond automatic mocking.

public interface IOpenApiRequestBody : Microsoft.OpenApi.IOpenApiDescribedElement, Microsoft.OpenApi.IOpenApiReadOnlyExtensible, Microsoft.OpenApi.IOpenApiReferenceable, Microsoft.OpenApi.IShallowCopyable<Microsoft.OpenApi.IOpenApiRequestBody>
type IOpenApiRequestBody = interface
    interface IOpenApiDescribedElement
    interface IOpenApiElement
    interface IOpenApiReadOnlyExtensible
    interface IShallowCopyable<IOpenApiRequestBody>
    interface IOpenApiReferenceable
    interface IOpenApiSerializable
Public Interface IOpenApiRequestBody
Implements IOpenApiDescribedElement, IOpenApiReadOnlyExtensible, IOpenApiReferenceable, IShallowCopyable(Of IOpenApiRequestBody)
Derived
Implements

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.

(Inherited from IOpenApiDescribedElement)
Extensions

Specification extensions.

(Inherited from IOpenApiReadOnlyExtensible)
Required

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

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.

CreateShallowCopy()

Create a shallow copy of the current instance.

(Inherited from IShallowCopyable<T>)
SerializeAsV2(IOpenApiWriter)

Serialize Open API element to v2.0.

(Inherited from IOpenApiSerializable)
SerializeAsV3(IOpenApiWriter)

Serialize Open API element to v3.0.

(Inherited from IOpenApiSerializable)
SerializeAsV31(IOpenApiWriter)

Serialize OpenAPI element into v3.1

(Inherited from IOpenApiSerializable)
SerializeAsV32(IOpenApiWriter)

Serialize OpenAPI element into v3.2

(Inherited from IOpenApiSerializable)

Extension Methods

Name Description
Validate(IOpenApiElement, ValidationRuleSet)

Validate element and all child elements

Applies to