@scalar/openapi-types
Version:
Modern OpenAPI types
56 lines • 2.66 kB
TypeScript
import { z } from 'zod';
/**
* Header Object
*
* 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.
*
* The Header Object follows the structure of the Parameter Object, including determining its serialization strategy
* based on whether schema or content is present, with the following changes:
*
* - name MUST NOT be specified, it is given in the corresponding headers map.
* - in MUST NOT be specified, it is implicitly in header.
* - All traits that are affected by the location MUST be applicable to a location of header (for example, style).
* This means that allowEmptyValue and allowReserved MUST NOT be used, and style, if used, MUST be limited to
* "simple".
*
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#header-object
*/
export declare const HeaderObjectSchema: z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
deprecated: z.ZodOptional<z.ZodBoolean>;
style: z.ZodOptional<z.ZodEnum<{
matrix: "matrix";
label: "label";
form: "form";
simple: "simple";
spaceDelimited: "spaceDelimited";
pipeDelimited: "pipeDelimited";
deepObject: "deepObject";
}>>;
explode: z.ZodOptional<z.ZodBoolean>;
example: z.ZodOptional<z.ZodAny>;
schema: z.ZodOptional<z.ZodType<any, unknown, z.core.$ZodTypeInternals<any, unknown>>>;
examples: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<readonly [z.ZodObject<{
$ref: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, z.core.$strip>, z.ZodObject<{
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodAny>;
externalValue: z.ZodOptional<z.ZodString>;
}, z.core.$strip>]>>>;
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
schema: z.ZodOptional<z.ZodType<Record<string, any>, unknown, z.core.$ZodTypeInternals<Record<string, any>, unknown>>>;
example: z.ZodOptional<z.ZodAny>;
examples: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodAny>;
externalValue: z.ZodOptional<z.ZodString>;
}, z.core.$strip>>>;
}, z.core.$strip>>>;
}, z.core.$strip>;
//# sourceMappingURL=header-object.d.ts.map