# Interface OS3MediaType

Interface
Module
import { OS3MediaType } from "@tsed/openspec"
Source/packages/specs/openspec/src/types/openspec3/OS3MediaType.ts

# Overview

interface OS3MediaType<Schema = OS3Schema> {
schema?<span class="token punctuation">:</span> <a href="/api/orm/mongoose/types/decorators/Schema.html"><span class="token">Schema</span></a> | <a href="/api/specs/openspec/types/common/OpenSpecRef.html"><span class="token">OpenSpecRef</span></a><span class="token punctuation">;</span>

example?<span class="token punctuation">:</span> <span class="token keyword">any</span><span class="token punctuation">;</span>

examples?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecHash.html"><span class="token">OpenSpecHash</span></a>&lt;<a href="/api/specs/openspec/types/openspec3/OS3Example.html"><span class="token">OS3Example</span></a> | <a href="/api/specs/openspec/types/common/OpenSpecRef.html"><span class="token">OpenSpecRef</span></a>&gt;<span class="token punctuation">;</span>

encoding?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecHash.html"><span class="token">OpenSpecHash</span></a>&lt;<a href="/api/specs/openspec/types/openspec3/OS3Encoding.html"><span class="token">OS3Encoding</span></a>&gt;<span class="token punctuation">;</span>

}

# Members

schema?: Schema | OpenSpecRef;

The schema defining the type used for the request body.


example?: any;

Example of the media type. 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 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.


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.