Skip to content

api-morph / MediaTypeObject

Interface: MediaTypeObject

Defined in: src/types/openapi.ts:658

Each Media Type Object provides schema and examples for the media type identified by its key.

See

https://spec.openapis.org/oas/v3.1.1#media-type-object

Indexable

[key: `x-${string}`]: any

This object MAY be extended with Specification Extensions.

Properties

encoding?

optional encoding: Record<string, EncodingObject>

Defined in: src/types/openapi.ts:680

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 field SHALL only apply to Request Body Objects, and only when the media type is multipart or application/x-www-form-urlencoded. If no Encoding Object is provided for a property, the behavior is determined by the default values documented for the Encoding Object.


example?

optional example: any

Defined in: src/types/openapi.ts:667

Example of the media type; see Working With Examples.


examples?

optional examples: Record<string, ReferenceObject | ExampleObject>

Defined in: src/types/openapi.ts:672

Examples of the media type; see Working With Examples.


schema?

optional schema: boolean | SchemaObject

Defined in: src/types/openapi.ts:662

The schema defining the content of the request, response, parameter, or header.

基于 MIT 许可证发布