@scalar/openapi-types
Version:
Modern OpenAPI types
633 lines • 28.1 kB
TypeScript
import { z } from 'zod';
/**
* Response Object
*
* Describes a single response from an API operation, including design-time, static links to operations based on the response.
*
* @see https://github.com/OAI/OpenAPI-Specification/blob/main/versions/3.1.1.md#response-object
*/
export declare const ResponseObjectSchema: z.ZodObject<{
/**
* REQUIRED. A description of the response. CommonMark syntax MAY be used for rich text representation.
*/
description: z.ZodString;
/**
* Maps a header name to its definition. RFC7230 states header names are case insensitive. If a response header is
* defined with the name "Content-Type", it SHALL be ignored.
*/
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 containing descriptions of potential response payloads. The key is a media type or media type range and the
* value describes it. For responses that match multiple keys, only the most specific key is applicable. e.g.
* "text/plain" overrides "text/*"
*/
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;
}>>>;
encoding: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
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;
}>>>;
}, "strip", z.ZodTypeAny, {
contentType: string;
headers?: Record<string, {
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;
}> | undefined;
}, {
contentType: string;
headers?: Record<string, {
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;
}> | 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;
encoding?: Record<string, {
contentType: string;
headers?: Record<string, {
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;
}> | undefined;
}> | undefined;
}, {
example?: any;
examples?: Record<string, {
description?: string | undefined;
summary?: string | undefined;
value?: any;
externalValue?: string | undefined;
}> | undefined;
schema?: Record<string, any> | undefined;
encoding?: Record<string, {
contentType: string;
headers?: Record<string, {
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;
}> | undefined;
}> | undefined;
}>>>;
/**
* A map of operations links that can be followed from the response. The key of the map is a short name for the link,
* following the naming constraints of the names for Component Objects.
*/
links: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
operationRef: z.ZodOptional<z.ZodString>;
operationId: z.ZodOptional<z.ZodString>;
parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodEffects<z.ZodString, string, string>>>;
requestBody: z.ZodOptional<z.ZodEffects<z.ZodString, string, string>>;
description: z.ZodOptional<z.ZodString>;
server: z.ZodOptional<z.ZodObject<{
url: z.ZodString;
description: z.ZodOptional<z.ZodString>;
variables: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodObject<{
enum: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
default: z.ZodOptional<z.ZodString>;
description: z.ZodOptional<z.ZodString>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
}, {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
}>>;
}, "strip", z.ZodTypeAny, {
description?: string | undefined;
operationId?: string | undefined;
parameters?: Record<string, string> | undefined;
requestBody?: string | undefined;
operationRef?: string | undefined;
server?: {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
} | undefined;
}, {
description?: string | undefined;
operationId?: string | undefined;
parameters?: Record<string, string> | undefined;
requestBody?: string | undefined;
operationRef?: string | undefined;
server?: {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
} | undefined;
}>>>;
}, "strip", z.ZodTypeAny, {
description: string;
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;
encoding?: Record<string, {
contentType: string;
headers?: Record<string, {
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;
}> | undefined;
}> | undefined;
}> | undefined;
headers?: Record<string, {
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;
}> | undefined;
links?: Record<string, {
description?: string | undefined;
operationId?: string | undefined;
parameters?: Record<string, string> | undefined;
requestBody?: string | undefined;
operationRef?: string | undefined;
server?: {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
} | undefined;
}> | undefined;
}, {
description: string;
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;
encoding?: Record<string, {
contentType: string;
headers?: Record<string, {
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;
}> | undefined;
}> | undefined;
}> | undefined;
headers?: Record<string, {
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;
}> | undefined;
links?: Record<string, {
description?: string | undefined;
operationId?: string | undefined;
parameters?: Record<string, string> | undefined;
requestBody?: string | undefined;
operationRef?: string | undefined;
server?: {
url: string;
description?: string | undefined;
variables?: Record<string, {
description?: string | undefined;
default?: string | undefined;
enum?: string[] | undefined;
}> | undefined;
} | undefined;
}> | undefined;
}>;
//# sourceMappingURL=response-object.d.ts.map