Skip to content

api-morph / HeaderObject

Interface: HeaderObject

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

Describes a single header for HTTP responses and for individual parts in multipart representations; see the relevant Response Object and Encoding Object documentation for restrictions on which headers can be described.

See

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

Indexable

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

This object MAY be extended with Specification Extensions.

Properties

content?

optional content: Record<string, MediaTypeObject>

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

A map containing the representations for the header. The key is the media type and the value describes it. The map MUST only contain one entry.


deprecated?

optional deprecated: boolean

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

Specifies that the header is deprecated and SHOULD be transitioned out of usage. Default value is false.


description?

optional description: string

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

A brief description of the header. This could contain examples of use. CommonMark syntax MAY be used for rich text representation.


example?

optional example: any

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

Example of the header's potential value; see Working With Examples.


examples?

optional examples: Record<string, ReferenceObject | ExampleObject>

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

Examples of the header's potential value; see Working With Examples.


explode?

optional explode: boolean

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

When this is true, header values of type array or object generate a single header whose value is a comma-separated list of the array items or key-value pairs of the map, see Style Examples. For other data types this field has no effect. The default value is false.


required?

optional required: boolean

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

Determines whether this header is mandatory. The default value is false.


schema?

optional schema: boolean | SchemaObject | ReferenceObject

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

The schema defining the type used for the header.


style?

optional style: "simple"

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

Describes how the header value will be serialized. The default (and only legal value for headers) is "simple".

基于 MIT 许可证发布