OpenApiRequestBody Class
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Request Body Object
public class OpenApiRequestBody : Microsoft.OpenApi.Interfaces.IEffective<Microsoft.OpenApi.Models.OpenApiRequestBody>, Microsoft.OpenApi.Interfaces.IOpenApiExtensible, Microsoft.OpenApi.Interfaces.IOpenApiReferenceable
type OpenApiRequestBody = class
interface IOpenApiSerializable
interface IOpenApiElement
interface IOpenApiReferenceable
interface IOpenApiExtensible
interface IEffective<OpenApiRequestBody>
Public Class OpenApiRequestBody
Implements IEffective(Of OpenApiRequestBody), IOpenApiExtensible, IOpenApiReferenceable
- Inheritance
-
OpenApiRequestBody
- Implements
Constructors
OpenApiRequestBody() |
Parameter-less constructor |
OpenApiRequestBody(OpenApiRequestBody) |
Initializes a copy instance of an OpenApiRequestBody object |
Properties
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 |
A brief description of the request body. This could contain examples of use. CommonMark syntax MAY be used for rich text representation. |
Extensions |
This object MAY be extended with Specification Extensions. |
Reference |
Reference object. |
Required |
Determines if the request body is required in the request. Defaults to false. |
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 OpenApiRequestBody to Open Api v2.0 |
SerializeAsV2WithoutReference(IOpenApiWriter) |
Serialize to OpenAPI V2 document without using reference. |
SerializeAsV3(IOpenApiWriter) |
Serialize OpenApiRequestBody 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. |