OpenApiMediaTypeReference 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.
Media Type Object Reference.
public class OpenApiMediaTypeReference : Microsoft.OpenApi.BaseOpenApiReferenceHolder<Microsoft.OpenApi.OpenApiMediaType,Microsoft.OpenApi.IOpenApiMediaType,Microsoft.OpenApi.BaseOpenApiReference>, Microsoft.OpenApi.IOpenApiMediaType, Microsoft.OpenApi.IShallowCopyable<Microsoft.OpenApi.IOpenApiMediaType>
type OpenApiMediaTypeReference = class
inherit BaseOpenApiReferenceHolder<OpenApiMediaType, IOpenApiMediaType, BaseOpenApiReference>
interface IOpenApiMediaType
interface IOpenApiReadOnlyExtensible
interface IShallowCopyable<IOpenApiMediaType>
interface IOpenApiReferenceable
interface IOpenApiSerializable
interface IOpenApiElement
Public Class OpenApiMediaTypeReference
Inherits BaseOpenApiReferenceHolder(Of OpenApiMediaType, IOpenApiMediaType, BaseOpenApiReference)
Implements IOpenApiMediaType, IShallowCopyable(Of IOpenApiMediaType)
- Inheritance
-
OpenApiMediaTypeReference
- Implements
Constructors
| Name | Description |
|---|---|
| OpenApiMediaTypeReference(String, OpenApiDocument, String) |
Constructor initializing the reference object. |
Properties
| Name | Description |
|---|---|
| Encoding |
A map between a property name and its encoding information. The key, being the property name, MUST exist in the schema as a property. The encoding object SHALL only apply to requestBody objects when the media type is multipart or application/x-www-form-urlencoded. |
| Example |
Example of the media type. The example object SHOULD be in the correct format as specified by the media type. You must use the IsJsonNullSentinel(JsonNode) method to check whether Default was assigned a null value in the document. Assign JsonNull to use get null as a serialized value. |
| Examples |
Examples of the media type. Each example object SHOULD match the media type and specified schema if present. |
| Extensions |
Specification extensions. |
| ItemEncoding |
An encoding object for items in an array schema. Only applies when the schema is of type array. |
| ItemSchema |
The schema defining the type used for the items in an array media type. This property is only applicable for OAS 3.2.0 and later. |
| PrefixEncoding |
An array of encoding objects for prefixItems in an array schema. Each element corresponds to a prefixItem in the schema. |
| RecursiveTarget |
Gets the recursively resolved target object. (Inherited from BaseOpenApiReferenceHolder<T,U,V>) |
| Reference |
Reference object. (Inherited from BaseOpenApiReferenceHolder<T,U,V>) |
| Schema |
The schema defining the type used for the request body. |
| 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 |
|---|---|
| CopyReference(BaseOpenApiReference) |
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(IOpenApiMediaType) |
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. (Inherited from BaseOpenApiReferenceHolder<T,U,V>) |
| SerializeAsV3(IOpenApiWriter) |
Serialize Open API element to v3.0. |
| SerializeAsV31(IOpenApiWriter) |
Serialize OpenAPI element into v3.1 |
| 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 |