MediaType

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

Members

Functions

toJson
Json toJson()
Undocumented in source. Be warned that the author may not have intended to support it.

Static functions

fromJson
MediaType fromJson(Json src)
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

encoding
Encoding[string] 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
string example;

The example object SHOULD be in the correct format as specified by the media type. The example field is mutually exclusive of the examples field. Furthermore, if referencing a schema which contains an example, the example value SHALL override the example provided by the schema.

examples
Example[string] examples;

Examples of the media type. Each example object SHOULD match the media type and specified schema if present. The examples field is mutually exclusive of the example field. Furthermore, if referencing a schema which contains an example, the examples value SHALL override the example provided by the schema.

parseJsonExample
bool parseJsonExample;

True if the example is a Json object or array. This flag is used for serialization.

schema
Schema schema;

The schema defining the type used for the request body.

Meta