@scalar/openapi-types
Version:
Modern OpenAPI types
402 lines • 16.6 kB
TypeScript
import { z } from 'zod';
/**
* Encoding Object
*
* A single encoding definition applied to a single schema property. See Appendix B for a discussion of converting
* values of various types to string representations.
*
* Properties are correlated with multipart parts using the name parameter of Content-Disposition: form-data, and with
* application/x-www-form-urlencoded using the query string parameter names. In both cases, their order is
* implementation-defined.
*
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#encoding-object
*/
export declare const EncodingObjectSchema: z.ZodObject<z.objectUtil.extendShape<{
contentType: z.ZodString;
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
description: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
deprecated: z.ZodOptional<z.ZodBoolean>;
style: z.ZodOptional<z.ZodEnum<["matrix", "label", "simple", "form", "spaceDelimited", "pipeDelimited", "deepObject"]>>;
explode: z.ZodOptional<z.ZodBoolean>;
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
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>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>>>;
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
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>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}, {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}>>>;
}, {
/**
* A map allowing additional information to be provided as headers. Content-Type is described separately and SHALL be
* ignored in this section. This field SHALL be ignored if the request body media type is not a multipart.
*/
headers: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
$ref: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}>, z.ZodObject<z.objectUtil.extendShape<{
description: z.ZodOptional<z.ZodString>;
required: z.ZodOptional<z.ZodBoolean>;
deprecated: z.ZodOptional<z.ZodBoolean>;
style: z.ZodOptional<z.ZodEnum<["matrix", "label", "simple", "form", "spaceDelimited", "pipeDelimited", "deepObject"]>>;
explode: z.ZodOptional<z.ZodBoolean>;
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
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>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>>>;
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
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>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}>>>;
}, {
schema: z.ZodOptional<z.ZodType<any, z.ZodTypeDef, any>>;
examples: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnion<[z.ZodObject<{
$ref: z.ZodString;
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}>, z.ZodObject<{
summary: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
value: z.ZodOptional<z.ZodAny>;
externalValue: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>]>>>;
content: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
schema: z.ZodOptional<z.ZodType<Record<string, any>, z.ZodTypeDef, Record<string, any>>>;
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>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}>>>;
}>, "strip", z.ZodTypeAny, {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
} | {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}> | undefined;
schema?: any;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}, {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
} | {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}> | undefined;
schema?: any;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}>]>>>;
}>, "strip", z.ZodTypeAny, {
contentType: string;
headers?: Record<string, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
} | {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
} | {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}> | undefined;
schema?: any;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}> | undefined;
}, {
contentType: string;
headers?: Record<string, {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
} | {
description?: string | undefined;
deprecated?: boolean | undefined;
content?: Record<string, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
}> | undefined;
required?: boolean | undefined;
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
} | {
$ref: string;
description?: string | undefined;
summary?: string | undefined;
}> | undefined;
schema?: any;
style?: "matrix" | "label" | "simple" | "form" | "spaceDelimited" | "pipeDelimited" | "deepObject" | undefined;
explode?: boolean | undefined;
}> | undefined;
}>;
//# sourceMappingURL=encoding-object.d.ts.map