import type { CollectionFormatObject } from './collection-format.js' import type { DefaultObject } from './default.js' import type { EnumObject } from './enum.js' import type { ExclusiveMaximumObject } from './exclusive-maximum.js' import type { ExclusiveMinimumObject } from './exclusive-minimum.js' import type { MaxItemsObject } from './max-items.js' import type { MaxLengthObject } from './max-length.js' import type { MaximumObject } from './maximum.js' import type { MinItemsObject } from './min-items.js' import type { MinLengthObject } from './min-length.js' import type { MinimumObject } from './minimum.js' import type { MultipleOfObject } from './multiple-of.js' import type { PatternObject } from './pattern.js' import type { PrimitivesItemsObject } from './primitives-items.js' import type { Extensions } from './schema.js' import type { UniqueItemsObject } from './unique-items.js' /** * Header object * * Field Name | Type | Description ---|:---:|--- description | `string` | A short description of the header. type | `string` | **Required.** The type of the object. The value MUST be one of `"string"`, `"number"`, `"integer"`, `"boolean"`, or `"array"`. format | `string` | The extending format for the previously mentioned [`type`](#stType). See [Data Type Formats](#dataTypeFormat) for further details. items | [Items Object](#items-object) | **Required if [`type`](#stType) is "array".** Describes the type of items in the array. collectionFormat | `string` | Determines the format of the array if type array is used. Possible values are: Default value is `csv`. default | * | Declares the value of the header that the server will use if none is provided. (Note: "default" has no meaning for required headers.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined [`type`](#headerDefault) for the header. maximum | `number` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2. exclusiveMaximum | `boolean` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2. minimum | `number` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3. exclusiveMinimum | `boolean` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3. maxLength | `integer` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1. minLength | `integer` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2. pattern | `string` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. maxItems | `integer` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2. minItems | `integer` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3. uniqueItems | `boolean` | https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4. enum | [*] | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1. multipleOf | `number` | See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1. * * @see {@link https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#header-object} */ export type HeaderObject = { /** **Required.** The type of the parameter. Since the parameter is not located at the request body, it is limited to simple types (that is, not an object). The value MUST be one of `"string"`, `"number"`, `"integer"`, `"boolean"`, `"array"` or `"file"`. If `type` is `"file"`, the [`consumes`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#operationConsumes) MUST be either `"multipart/form-data"`, `" application/x-www-form-urlencoded"` or both and the parameter MUST be [`in`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterIn) `"formData"`. */ type: 'string' | 'number' | 'integer' | 'boolean' | 'array' /** The extending format for the previously mentioned [`type`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType). See [Data Type Formats](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#dataTypeFormat) for further details. */ format?: string /** **Required if [`type`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType) is "array".** Describes the type of items in the array. */ items?: PrimitivesItemsObject /** Determines the format of the array if type array is used. Possible values are: Default value is `csv`. */ collectionFormat?: CollectionFormatObject /** Declares the value of the parameter that the server will use if none is provided, for example a "count" to control the number of results per page might default to 100 if not supplied by the client in the request. (Note: "default" has no meaning for required parameters.) See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-6.2. Unlike JSON Schema this value MUST conform to the defined [`type`](https://github.com/OAI/OpenAPI-Specification/blob/main/versions/2.0.md#parameterType) for this parameter. */ default?: DefaultObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2. */ maximum?: MaximumObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.2. */ exclusiveMaximum?: ExclusiveMaximumObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3. */ minimum?: MinimumObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.3. */ exclusiveMinimum?: ExclusiveMinimumObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.1. */ maxLength?: MaxLengthObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.2. */ minLength?: MinLengthObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.2.3. */ pattern?: PatternObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.2. */ maxItems?: MaxItemsObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.3. */ minItems?: MinItemsObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.3.4. */ uniqueItems?: UniqueItemsObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.5.1. */ enum?: EnumObject /** See https://tools.ietf.org/html/draft-fge-json-schema-validation-00#section-5.1.1. */ multipleOf?: MultipleOfObject /** A brief description of the parameter. This could contain examples of use. [GFM syntax](https://guides.github.com/features/mastering-markdown/#GitHub-flavored-markdown) can be used for rich text representation. */ description?: string } & Extensions