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.IOpenApiExtensible, Microsoft.OpenApi.IOpenApiRequestBody, Microsoft.OpenApi.IShallowCopyable<Microsoft.OpenApi.IOpenApiRequestBody>
type OpenApiRequestBody = class
interface IOpenApiExtensible
interface IOpenApiElement
interface IOpenApiRequestBody
interface IOpenApiDescribedElement
interface IOpenApiReadOnlyExtensible
interface IShallowCopyable<IOpenApiRequestBody>
interface IOpenApiReferenceable
interface IOpenApiSerializable
Public Class OpenApiRequestBody
Implements IOpenApiExtensible, IOpenApiRequestBody, IShallowCopyable(Of IOpenApiRequestBody)
- Inheritance
-
OpenApiRequestBody
- Implements
Constructors
| Name | Description |
|---|---|
| OpenApiRequestBody() |
Parameter-less constructor |
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. |
| 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. |
| SerializeAsV2(IOpenApiWriter) |
Serialize OpenApiRequestBody to Open Api v2.0 |
| SerializeAsV3(IOpenApiWriter) |
Serialize OpenApiRequestBody to Open Api v3.0 |
| SerializeAsV31(IOpenApiWriter) |
Serialize OpenApiRequestBody to Open Api v3.1 |
| SerializeAsV32(IOpenApiWriter) |
Serialize OpenApiRequestBody to Open Api v3.2 |
Extension Methods
| Name | Description |
|---|---|
| Validate(IOpenApiElement, ValidationRuleSet) |
Validate element and all child elements |