# Interface OS3Encoding
InterfaceModule | import { OS3Encoding } from "@tsed/openspec" |
---|---|
Source | /packages/specs/openspec/src/types/openspec3/OS3Encoding.ts |
# Overview
interface OS3Encoding {
contentType?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>
headers?<span class="token punctuation">:</span> <a href="/api/specs/openspec/types/common/OpenSpecHash.html"><span class="token">OpenSpecHash</span></a><<a href="/api/specs/openspec/types/openspec3/OS3Header.html"><span class="token">OS3Header</span></a>><span class="token punctuation">;</span>
style?<span class="token punctuation">:</span> <span class="token keyword">string</span><span class="token punctuation">;</span>
explode?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>
allowReserved?<span class="token punctuation">:</span> <span class="token keyword">boolean</span><span class="token punctuation">;</span>
}
# Members
contentType?: string;
The Content-Type
for encoding a specific property. Default value depends on the property type: for string
with format
being binary
– application/octet-stream
; for other primitive types – text/plain
; for object
- application/json; for array
– the default is defined based on the inner type. The value can be a specific media type (e.g. application/json
), a wildcard media type (e.g. image/*
), or a comma-separated list of the two types.
headers?: OpenSpecHash<OS3Header>;
A map allowing additional information to be provided as headers, for example Content-Disposition
. Content-Type
is described separately and SHALL be ignored in this section. This property SHALL be ignored if the request body media type is not a multipart.
style?: string;
Describes how a specific property value will be serialized depending on its type. See Parameter Object[style](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterStyle)
property. The behavior follows the same values as query
parameters, including default values. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded
.
explode?: boolean;
When this is true, property values of type array
or object
generate separate parameters for each value of the array, or key-value-pair of the map. For other types of properties this property has no effect. When [style](https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.1.md#parameterStyle)
is form
, the default value is true. For all other styles, the default value is false
. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded
.
allowReserved?: boolean;
Determines whether the parameter value SHOULD allow reserved characters, as defined by RFC3986:/?#[]@!$&'()*+,;=
to be included without percent-encoding. The default value is false
. This property SHALL be ignored if the request body media type is not application/x-www-form-urlencoded
.