zod-openapi 2.19.0 → 3.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,4 @@
1
+ declare const openApiVersions: readonly ["3.0.0", "3.0.1", "3.0.2", "3.0.3", "3.1.0"];
2
+ type OpenApiVersion = (typeof openApiVersions)[number];
3
+
4
+ export { type OpenApiVersion, openApiVersions };
@@ -0,0 +1,16 @@
1
+ import { ISpecificationExtension } from './specification-extension.js';
2
+
3
+ interface ServerObject extends ISpecificationExtension {
4
+ url: string;
5
+ description?: string;
6
+ variables?: {
7
+ [v: string]: ServerVariableObject;
8
+ };
9
+ }
10
+ interface ServerVariableObject extends ISpecificationExtension {
11
+ enum?: string[] | boolean[] | number[];
12
+ default: string | boolean | number;
13
+ description?: string;
14
+ }
15
+
16
+ export type { ServerObject, ServerVariableObject };
@@ -0,0 +1,290 @@
1
+ import { ServerObject } from './oas-common.js';
2
+ export { ServerVariableObject } from './oas-common.js';
3
+ import { ISpecificationExtension } from './specification-extension.js';
4
+
5
+ interface OpenAPIObject extends ISpecificationExtension {
6
+ openapi: string;
7
+ info: InfoObject;
8
+ servers?: ServerObject[];
9
+ paths: PathsObject;
10
+ components?: ComponentsObject;
11
+ security?: SecurityRequirementObject[];
12
+ tags?: TagObject[];
13
+ externalDocs?: ExternalDocumentationObject;
14
+ }
15
+ interface InfoObject extends ISpecificationExtension {
16
+ title: string;
17
+ description?: string;
18
+ termsOfService?: string;
19
+ contact?: ContactObject;
20
+ license?: LicenseObject;
21
+ version: string;
22
+ }
23
+ interface ContactObject extends ISpecificationExtension {
24
+ name?: string;
25
+ url?: string;
26
+ email?: string;
27
+ }
28
+ interface LicenseObject extends ISpecificationExtension {
29
+ name: string;
30
+ url?: string;
31
+ }
32
+ interface ComponentsObject extends ISpecificationExtension {
33
+ schemas?: {
34
+ [schema: string]: SchemaObject | ReferenceObject;
35
+ };
36
+ responses?: {
37
+ [response: string]: ResponseObject | ReferenceObject;
38
+ };
39
+ parameters?: {
40
+ [parameter: string]: ParameterObject | ReferenceObject;
41
+ };
42
+ examples?: {
43
+ [example: string]: ExampleObject | ReferenceObject;
44
+ };
45
+ requestBodies?: {
46
+ [request: string]: RequestBodyObject | ReferenceObject;
47
+ };
48
+ headers?: {
49
+ [header: string]: HeaderObject | ReferenceObject;
50
+ };
51
+ securitySchemes?: {
52
+ [securityScheme: string]: SecuritySchemeObject | ReferenceObject;
53
+ };
54
+ links?: {
55
+ [link: string]: LinkObject | ReferenceObject;
56
+ };
57
+ callbacks?: {
58
+ [callback: string]: CallbackObject | ReferenceObject;
59
+ };
60
+ }
61
+ interface PathsObject extends ISpecificationExtension {
62
+ [path: string]: PathItemObject;
63
+ }
64
+ type PathObject = PathsObject;
65
+ interface PathItemObject extends ISpecificationExtension {
66
+ $ref?: string;
67
+ summary?: string;
68
+ description?: string;
69
+ get?: OperationObject;
70
+ put?: OperationObject;
71
+ post?: OperationObject;
72
+ delete?: OperationObject;
73
+ options?: OperationObject;
74
+ head?: OperationObject;
75
+ patch?: OperationObject;
76
+ trace?: OperationObject;
77
+ servers?: ServerObject[];
78
+ parameters?: (ParameterObject | ReferenceObject)[];
79
+ }
80
+ interface OperationObject extends ISpecificationExtension {
81
+ tags?: string[];
82
+ summary?: string;
83
+ description?: string;
84
+ externalDocs?: ExternalDocumentationObject;
85
+ operationId?: string;
86
+ parameters?: (ParameterObject | ReferenceObject)[];
87
+ requestBody?: RequestBodyObject | ReferenceObject;
88
+ responses: ResponsesObject;
89
+ callbacks?: CallbacksObject;
90
+ deprecated?: boolean;
91
+ security?: SecurityRequirementObject[];
92
+ servers?: ServerObject[];
93
+ }
94
+ interface ExternalDocumentationObject extends ISpecificationExtension {
95
+ description?: string;
96
+ url: string;
97
+ }
98
+ type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
99
+ type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
100
+ interface BaseParameterObject extends ISpecificationExtension {
101
+ description?: string;
102
+ required?: boolean;
103
+ deprecated?: boolean;
104
+ allowEmptyValue?: boolean;
105
+ style?: ParameterStyle;
106
+ explode?: boolean;
107
+ allowReserved?: boolean;
108
+ schema?: SchemaObject | ReferenceObject;
109
+ examples?: {
110
+ [param: string]: ExampleObject | ReferenceObject;
111
+ };
112
+ example?: any;
113
+ content?: ContentObject;
114
+ }
115
+ interface ParameterObject extends BaseParameterObject {
116
+ name: string;
117
+ in: ParameterLocation;
118
+ }
119
+ interface RequestBodyObject extends ISpecificationExtension {
120
+ description?: string;
121
+ content: ContentObject;
122
+ required?: boolean;
123
+ }
124
+ interface ContentObject {
125
+ [mediatype: string]: MediaTypeObject;
126
+ }
127
+ interface MediaTypeObject extends ISpecificationExtension {
128
+ schema?: SchemaObject | ReferenceObject;
129
+ examples?: ExamplesObject;
130
+ example?: any;
131
+ encoding?: EncodingObject;
132
+ }
133
+ interface EncodingObject extends ISpecificationExtension {
134
+ [property: string]: EncodingPropertyObject | any;
135
+ }
136
+ interface EncodingPropertyObject {
137
+ contentType?: string;
138
+ headers?: {
139
+ [key: string]: HeaderObject | ReferenceObject;
140
+ };
141
+ style?: string;
142
+ explode?: boolean;
143
+ allowReserved?: boolean;
144
+ [key: string]: any;
145
+ }
146
+ interface ResponsesObject extends ISpecificationExtension {
147
+ default?: ResponseObject | ReferenceObject;
148
+ [statuscode: string]: ResponseObject | ReferenceObject | any;
149
+ }
150
+ interface ResponseObject extends ISpecificationExtension {
151
+ description: string;
152
+ headers?: HeadersObject;
153
+ content?: ContentObject;
154
+ links?: LinksObject;
155
+ }
156
+ interface CallbacksObject extends ISpecificationExtension {
157
+ [name: string]: CallbackObject | ReferenceObject | any;
158
+ }
159
+ interface CallbackObject extends ISpecificationExtension {
160
+ [name: string]: PathItemObject | any;
161
+ }
162
+ interface HeadersObject {
163
+ [name: string]: HeaderObject | ReferenceObject;
164
+ }
165
+ interface ExampleObject {
166
+ summary?: string;
167
+ description?: string;
168
+ value?: any;
169
+ externalValue?: string;
170
+ [property: string]: any;
171
+ }
172
+ interface LinksObject {
173
+ [name: string]: LinkObject | ReferenceObject;
174
+ }
175
+ interface LinkObject extends ISpecificationExtension {
176
+ operationRef?: string;
177
+ operationId?: string;
178
+ parameters?: LinkParametersObject;
179
+ requestBody?: any | string;
180
+ description?: string;
181
+ server?: ServerObject;
182
+ [property: string]: any;
183
+ }
184
+ interface LinkParametersObject {
185
+ [name: string]: any | string;
186
+ }
187
+ interface HeaderObject extends BaseParameterObject {
188
+ $ref?: string;
189
+ }
190
+ interface TagObject extends ISpecificationExtension {
191
+ name: string;
192
+ description?: string;
193
+ externalDocs?: ExternalDocumentationObject;
194
+ [extension: string]: any;
195
+ }
196
+ interface ExamplesObject {
197
+ [name: string]: ExampleObject | ReferenceObject;
198
+ }
199
+ interface ReferenceObject {
200
+ $ref: string;
201
+ }
202
+ type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
203
+ type SchemaObjectFormat = 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
204
+ interface SchemaObject extends ISpecificationExtension {
205
+ nullable?: boolean;
206
+ discriminator?: DiscriminatorObject;
207
+ readOnly?: boolean;
208
+ writeOnly?: boolean;
209
+ xml?: XmlObject;
210
+ externalDocs?: ExternalDocumentationObject;
211
+ example?: any;
212
+ examples?: any[];
213
+ deprecated?: boolean;
214
+ type?: SchemaObjectType | SchemaObjectType[];
215
+ format?: SchemaObjectFormat;
216
+ allOf?: (SchemaObject | ReferenceObject)[];
217
+ oneOf?: (SchemaObject | ReferenceObject)[];
218
+ anyOf?: (SchemaObject | ReferenceObject)[];
219
+ not?: SchemaObject | ReferenceObject;
220
+ items?: SchemaObject | ReferenceObject;
221
+ properties?: {
222
+ [propertyName: string]: SchemaObject | ReferenceObject;
223
+ };
224
+ additionalProperties?: SchemaObject | ReferenceObject | boolean;
225
+ description?: string;
226
+ default?: any;
227
+ title?: string;
228
+ multipleOf?: number;
229
+ maximum?: number;
230
+ exclusiveMaximum?: boolean;
231
+ minimum?: number;
232
+ exclusiveMinimum?: boolean;
233
+ maxLength?: number;
234
+ minLength?: number;
235
+ pattern?: string;
236
+ maxItems?: number;
237
+ minItems?: number;
238
+ uniqueItems?: boolean;
239
+ maxProperties?: number;
240
+ minProperties?: number;
241
+ required?: string[];
242
+ enum?: any[];
243
+ }
244
+ interface SchemasObject {
245
+ [schema: string]: SchemaObject;
246
+ }
247
+ interface DiscriminatorObject {
248
+ propertyName: string;
249
+ mapping?: {
250
+ [key: string]: string;
251
+ };
252
+ }
253
+ interface XmlObject extends ISpecificationExtension {
254
+ name?: string;
255
+ namespace?: string;
256
+ prefix?: string;
257
+ attribute?: boolean;
258
+ wrapped?: boolean;
259
+ }
260
+ type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
261
+ interface SecuritySchemeObject extends ISpecificationExtension {
262
+ type: SecuritySchemeType;
263
+ description?: string;
264
+ name?: string;
265
+ in?: string;
266
+ scheme?: string;
267
+ bearerFormat?: string;
268
+ flows?: OAuthFlowsObject;
269
+ openIdConnectUrl?: string;
270
+ }
271
+ interface OAuthFlowsObject extends ISpecificationExtension {
272
+ implicit?: OAuthFlowObject;
273
+ password?: OAuthFlowObject;
274
+ clientCredentials?: OAuthFlowObject;
275
+ authorizationCode?: OAuthFlowObject;
276
+ }
277
+ interface OAuthFlowObject extends ISpecificationExtension {
278
+ authorizationUrl?: string;
279
+ tokenUrl?: string;
280
+ refreshUrl?: string;
281
+ scopes: ScopesObject;
282
+ }
283
+ interface ScopesObject extends ISpecificationExtension {
284
+ [scope: string]: any;
285
+ }
286
+ interface SecurityRequirementObject {
287
+ [name: string]: string[];
288
+ }
289
+
290
+ export { type BaseParameterObject, type CallbackObject, type CallbacksObject, type ComponentsObject, type ContactObject, type ContentObject, type DiscriminatorObject, type EncodingObject, type EncodingPropertyObject, type ExampleObject, type ExamplesObject, type ExternalDocumentationObject, type HeaderObject, type HeadersObject, ISpecificationExtension, type InfoObject, type LicenseObject, type LinkObject, type LinkParametersObject, type LinksObject, type MediaTypeObject, type OAuthFlowObject, type OAuthFlowsObject, type OpenAPIObject, type OperationObject, type ParameterLocation, type ParameterObject, type ParameterStyle, type PathItemObject, type PathObject, type PathsObject, type ReferenceObject, type RequestBodyObject, type ResponseObject, type ResponsesObject, type SchemaObject, type SchemaObjectFormat, type SchemaObjectType, type SchemasObject, type ScopesObject, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, ServerObject, type TagObject, type XmlObject };
@@ -0,0 +1,297 @@
1
+ import { ServerObject } from './oas-common.js';
2
+ export { ServerVariableObject } from './oas-common.js';
3
+ import { ISpecificationExtension } from './specification-extension.js';
4
+
5
+ interface OpenAPIObject extends ISpecificationExtension {
6
+ openapi: string;
7
+ info: InfoObject;
8
+ servers?: ServerObject[];
9
+ paths?: PathsObject;
10
+ components?: ComponentsObject;
11
+ security?: SecurityRequirementObject[];
12
+ tags?: TagObject[];
13
+ externalDocs?: ExternalDocumentationObject;
14
+ webhooks?: PathsObject;
15
+ }
16
+ interface InfoObject extends ISpecificationExtension {
17
+ title: string;
18
+ description?: string;
19
+ termsOfService?: string;
20
+ contact?: ContactObject;
21
+ license?: LicenseObject;
22
+ version: string;
23
+ }
24
+ interface ContactObject extends ISpecificationExtension {
25
+ name?: string;
26
+ url?: string;
27
+ email?: string;
28
+ }
29
+ interface LicenseObject extends ISpecificationExtension {
30
+ name: string;
31
+ identifier?: string;
32
+ url?: string;
33
+ }
34
+ interface ComponentsObject extends ISpecificationExtension {
35
+ schemas?: {
36
+ [schema: string]: SchemaObject | ReferenceObject;
37
+ };
38
+ responses?: {
39
+ [response: string]: ResponseObject | ReferenceObject;
40
+ };
41
+ parameters?: {
42
+ [parameter: string]: ParameterObject | ReferenceObject;
43
+ };
44
+ examples?: {
45
+ [example: string]: ExampleObject | ReferenceObject;
46
+ };
47
+ requestBodies?: {
48
+ [request: string]: RequestBodyObject | ReferenceObject;
49
+ };
50
+ headers?: {
51
+ [header: string]: HeaderObject | ReferenceObject;
52
+ };
53
+ securitySchemes?: {
54
+ [securityScheme: string]: SecuritySchemeObject | ReferenceObject;
55
+ };
56
+ links?: {
57
+ [link: string]: LinkObject | ReferenceObject;
58
+ };
59
+ callbacks?: {
60
+ [callback: string]: CallbackObject | ReferenceObject;
61
+ };
62
+ }
63
+ interface PathsObject extends ISpecificationExtension {
64
+ [path: string]: PathItemObject;
65
+ }
66
+ type PathObject = PathsObject;
67
+ interface PathItemObject extends ISpecificationExtension {
68
+ $ref?: string;
69
+ summary?: string;
70
+ description?: string;
71
+ get?: OperationObject;
72
+ put?: OperationObject;
73
+ post?: OperationObject;
74
+ delete?: OperationObject;
75
+ options?: OperationObject;
76
+ head?: OperationObject;
77
+ patch?: OperationObject;
78
+ trace?: OperationObject;
79
+ servers?: ServerObject[];
80
+ parameters?: (ParameterObject | ReferenceObject)[];
81
+ }
82
+ interface OperationObject extends ISpecificationExtension {
83
+ tags?: string[];
84
+ summary?: string;
85
+ description?: string;
86
+ externalDocs?: ExternalDocumentationObject;
87
+ operationId?: string;
88
+ parameters?: (ParameterObject | ReferenceObject)[];
89
+ requestBody?: RequestBodyObject | ReferenceObject;
90
+ responses?: ResponsesObject;
91
+ callbacks?: CallbacksObject;
92
+ deprecated?: boolean;
93
+ security?: SecurityRequirementObject[];
94
+ servers?: ServerObject[];
95
+ }
96
+ interface ExternalDocumentationObject extends ISpecificationExtension {
97
+ description?: string;
98
+ url: string;
99
+ }
100
+ type ParameterLocation = 'query' | 'header' | 'path' | 'cookie';
101
+ type ParameterStyle = 'matrix' | 'label' | 'form' | 'simple' | 'spaceDelimited' | 'pipeDelimited' | 'deepObject';
102
+ interface BaseParameterObject extends ISpecificationExtension {
103
+ description?: string;
104
+ required?: boolean;
105
+ deprecated?: boolean;
106
+ allowEmptyValue?: boolean;
107
+ style?: ParameterStyle;
108
+ explode?: boolean;
109
+ allowReserved?: boolean;
110
+ schema?: SchemaObject | ReferenceObject;
111
+ examples?: {
112
+ [param: string]: ExampleObject | ReferenceObject;
113
+ };
114
+ example?: any;
115
+ content?: ContentObject;
116
+ }
117
+ interface ParameterObject extends BaseParameterObject {
118
+ name: string;
119
+ in: ParameterLocation;
120
+ }
121
+ interface RequestBodyObject extends ISpecificationExtension {
122
+ description?: string;
123
+ content: ContentObject;
124
+ required?: boolean;
125
+ }
126
+ interface ContentObject {
127
+ [mediatype: string]: MediaTypeObject;
128
+ }
129
+ interface MediaTypeObject extends ISpecificationExtension {
130
+ schema?: SchemaObject | ReferenceObject;
131
+ examples?: ExamplesObject;
132
+ example?: any;
133
+ encoding?: EncodingObject;
134
+ }
135
+ interface EncodingObject extends ISpecificationExtension {
136
+ [property: string]: EncodingPropertyObject | any;
137
+ }
138
+ interface EncodingPropertyObject {
139
+ contentType?: string;
140
+ headers?: {
141
+ [key: string]: HeaderObject | ReferenceObject;
142
+ };
143
+ style?: string;
144
+ explode?: boolean;
145
+ allowReserved?: boolean;
146
+ [key: string]: any;
147
+ }
148
+ interface ResponsesObject extends ISpecificationExtension {
149
+ default?: ResponseObject | ReferenceObject;
150
+ [statuscode: string]: ResponseObject | ReferenceObject | any;
151
+ }
152
+ interface ResponseObject extends ISpecificationExtension {
153
+ description: string;
154
+ headers?: HeadersObject;
155
+ content?: ContentObject;
156
+ links?: LinksObject;
157
+ }
158
+ interface CallbacksObject extends ISpecificationExtension {
159
+ [name: string]: CallbackObject | ReferenceObject | any;
160
+ }
161
+ interface CallbackObject extends ISpecificationExtension {
162
+ [name: string]: PathItemObject | any;
163
+ }
164
+ interface HeadersObject {
165
+ [name: string]: HeaderObject | ReferenceObject;
166
+ }
167
+ interface ExampleObject {
168
+ summary?: string;
169
+ description?: string;
170
+ value?: any;
171
+ externalValue?: string;
172
+ [property: string]: any;
173
+ }
174
+ interface LinksObject {
175
+ [name: string]: LinkObject | ReferenceObject;
176
+ }
177
+ interface LinkObject extends ISpecificationExtension {
178
+ operationRef?: string;
179
+ operationId?: string;
180
+ parameters?: LinkParametersObject;
181
+ requestBody?: any | string;
182
+ description?: string;
183
+ server?: ServerObject;
184
+ [property: string]: any;
185
+ }
186
+ interface LinkParametersObject {
187
+ [name: string]: any | string;
188
+ }
189
+ interface HeaderObject extends BaseParameterObject {
190
+ $ref?: string;
191
+ }
192
+ interface TagObject extends ISpecificationExtension {
193
+ name: string;
194
+ description?: string;
195
+ externalDocs?: ExternalDocumentationObject;
196
+ [extension: string]: any;
197
+ }
198
+ interface ExamplesObject {
199
+ [name: string]: ExampleObject | ReferenceObject;
200
+ }
201
+ interface ReferenceObject {
202
+ $ref: string;
203
+ summary?: string;
204
+ description?: string;
205
+ }
206
+ type SchemaObjectType = 'integer' | 'number' | 'string' | 'boolean' | 'object' | 'null' | 'array';
207
+ interface SchemaObject extends ISpecificationExtension {
208
+ discriminator?: DiscriminatorObject;
209
+ readOnly?: boolean;
210
+ writeOnly?: boolean;
211
+ xml?: XmlObject;
212
+ externalDocs?: ExternalDocumentationObject;
213
+ example?: any;
214
+ examples?: any[];
215
+ deprecated?: boolean;
216
+ type?: SchemaObjectType | SchemaObjectType[];
217
+ format?: 'int32' | 'int64' | 'float' | 'double' | 'byte' | 'binary' | 'date' | 'date-time' | 'password' | string;
218
+ allOf?: (SchemaObject | ReferenceObject)[];
219
+ oneOf?: (SchemaObject | ReferenceObject)[];
220
+ anyOf?: (SchemaObject | ReferenceObject)[];
221
+ not?: SchemaObject | ReferenceObject;
222
+ items?: SchemaObject | ReferenceObject;
223
+ properties?: {
224
+ [propertyName: string]: SchemaObject | ReferenceObject;
225
+ };
226
+ additionalProperties?: SchemaObject | ReferenceObject | boolean;
227
+ propertyNames?: SchemaObject | ReferenceObject;
228
+ description?: string;
229
+ default?: any;
230
+ title?: string;
231
+ multipleOf?: number;
232
+ maximum?: number;
233
+ const?: any;
234
+ exclusiveMaximum?: number;
235
+ minimum?: number;
236
+ exclusiveMinimum?: number;
237
+ maxLength?: number;
238
+ minLength?: number;
239
+ pattern?: string;
240
+ maxItems?: number;
241
+ minItems?: number;
242
+ uniqueItems?: boolean;
243
+ maxProperties?: number;
244
+ minProperties?: number;
245
+ required?: string[];
246
+ enum?: any[];
247
+ prefixItems?: (SchemaObject | ReferenceObject)[];
248
+ contentMediaType?: string;
249
+ contentEncoding?: string;
250
+ }
251
+ interface SchemasObject {
252
+ [schema: string]: SchemaObject;
253
+ }
254
+ interface DiscriminatorObject {
255
+ propertyName: string;
256
+ mapping?: {
257
+ [key: string]: string;
258
+ };
259
+ }
260
+ interface XmlObject extends ISpecificationExtension {
261
+ name?: string;
262
+ namespace?: string;
263
+ prefix?: string;
264
+ attribute?: boolean;
265
+ wrapped?: boolean;
266
+ }
267
+ type SecuritySchemeType = 'apiKey' | 'http' | 'oauth2' | 'openIdConnect';
268
+ interface SecuritySchemeObject extends ISpecificationExtension {
269
+ type: SecuritySchemeType;
270
+ description?: string;
271
+ name?: string;
272
+ in?: string;
273
+ scheme?: string;
274
+ bearerFormat?: string;
275
+ flows?: OAuthFlowsObject;
276
+ openIdConnectUrl?: string;
277
+ }
278
+ interface OAuthFlowsObject extends ISpecificationExtension {
279
+ implicit?: OAuthFlowObject;
280
+ password?: OAuthFlowObject;
281
+ clientCredentials?: OAuthFlowObject;
282
+ authorizationCode?: OAuthFlowObject;
283
+ }
284
+ interface OAuthFlowObject extends ISpecificationExtension {
285
+ authorizationUrl?: string;
286
+ tokenUrl?: string;
287
+ refreshUrl?: string;
288
+ scopes: ScopesObject;
289
+ }
290
+ interface ScopesObject extends ISpecificationExtension {
291
+ [scope: string]: any;
292
+ }
293
+ interface SecurityRequirementObject {
294
+ [name: string]: string[];
295
+ }
296
+
297
+ export { type BaseParameterObject, type CallbackObject, type CallbacksObject, type ComponentsObject, type ContactObject, type ContentObject, type DiscriminatorObject, type EncodingObject, type EncodingPropertyObject, type ExampleObject, type ExamplesObject, type ExternalDocumentationObject, type HeaderObject, type HeadersObject, ISpecificationExtension, type InfoObject, type LicenseObject, type LinkObject, type LinkParametersObject, type LinksObject, type MediaTypeObject, type OAuthFlowObject, type OAuthFlowsObject, type OpenAPIObject, type OperationObject, type ParameterLocation, type ParameterObject, type ParameterStyle, type PathItemObject, type PathObject, type PathsObject, type ReferenceObject, type RequestBodyObject, type ResponseObject, type ResponsesObject, type SchemaObject, type SchemaObjectType, type SchemasObject, type ScopesObject, type SecurityRequirementObject, type SecuritySchemeObject, type SecuritySchemeType, ServerObject, type TagObject, type XmlObject };
@@ -0,0 +1,7 @@
1
+ type IExtensionName = `x-${string}`;
2
+ type IExtensionType = any;
3
+ type ISpecificationExtension = {
4
+ [extensionName: IExtensionName]: IExtensionType;
5
+ };
6
+
7
+ export type { IExtensionName, IExtensionType, ISpecificationExtension };
@@ -0,0 +1,3 @@
1
+ export { BaseParameterObject, CallbackObject, CallbacksObject, ComponentsObject, ContactObject, ContentObject, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectFormat, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, TagObject, XmlObject } from './model/openapi30.js';
2
+ export { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension.js';
3
+ export { ServerObject, ServerVariableObject } from './model/oas-common.js';
@@ -0,0 +1,3 @@
1
+ export { BaseParameterObject, CallbackObject, CallbacksObject, ComponentsObject, ContactObject, ContentObject, DiscriminatorObject, EncodingObject, EncodingPropertyObject, ExampleObject, ExamplesObject, ExternalDocumentationObject, HeaderObject, HeadersObject, InfoObject, LicenseObject, LinkObject, LinkParametersObject, LinksObject, MediaTypeObject, OAuthFlowObject, OAuthFlowsObject, OpenAPIObject, OperationObject, ParameterLocation, ParameterObject, ParameterStyle, PathItemObject, PathObject, PathsObject, ReferenceObject, RequestBodyObject, ResponseObject, ResponsesObject, SchemaObject, SchemaObjectType, SchemasObject, ScopesObject, SecurityRequirementObject, SecuritySchemeObject, SecuritySchemeType, TagObject, XmlObject } from './model/openapi31.js';
2
+ export { IExtensionName, IExtensionType, ISpecificationExtension } from './model/specification-extension.js';
3
+ export { ServerObject, ServerVariableObject } from './model/oas-common.js';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "zod-openapi",
3
- "version": "2.19.0",
3
+ "version": "3.0.0",
4
4
  "description": "Convert Zod Schemas to OpenAPI v3.x documentation",
5
5
  "keywords": [
6
6
  "typescript",
@@ -34,6 +34,14 @@
34
34
  "import": "./dist/index.mjs",
35
35
  "require": "./dist/index.cjs"
36
36
  },
37
+ "./api": {
38
+ "types": {
39
+ "import": "./dist/api.d.mts",
40
+ "require": "./dist/api.d.ts"
41
+ },
42
+ "import": "./dist/api.mjs",
43
+ "require": "./dist/api.cjs"
44
+ },
37
45
  "./extend": {
38
46
  "types": {
39
47
  "import": "./dist/extend.d.mts",
@@ -48,6 +56,7 @@
48
56
  "module": "./dist/index.mjs",
49
57
  "types": "./dist/index.d.ts",
50
58
  "files": [
59
+ "api",
51
60
  "dist",
52
61
  "extend"
53
62
  ],
@@ -63,14 +72,14 @@
63
72
  "test:watch": "skuba test --watch"
64
73
  },
65
74
  "devDependencies": {
66
- "@arethetypeswrong/cli": "0.15.3",
67
- "@crackle/cli": "0.15.4",
68
- "@redocly/cli": "1.15.0",
75
+ "@arethetypeswrong/cli": "0.16.2",
76
+ "@crackle/cli": "0.15.5",
77
+ "@redocly/cli": "1.25.2",
69
78
  "@types/node": "^20.3.0",
70
79
  "eslint-plugin-zod-openapi": "^0.2.0",
71
- "openapi3-ts": "4.3.3",
72
- "skuba": "8.0.1",
73
- "yaml": "2.4.5",
80
+ "openapi3-ts": "4.4.0",
81
+ "skuba": "8.2.1",
82
+ "yaml": "2.5.1",
74
83
  "zod": "3.23.8"
75
84
  },
76
85
  "peerDependencies": {
@@ -78,7 +87,7 @@
78
87
  },
79
88
  "packageManager": "pnpm@9.0.5",
80
89
  "engines": {
81
- "node": ">=16.11"
90
+ "node": ">=18"
82
91
  },
83
92
  "publishConfig": {
84
93
  "provenance": true,
@@ -88,6 +97,6 @@
88
97
  "entryPoint": "src/index.ts",
89
98
  "template": "oss-npm-package",
90
99
  "type": "package",
91
- "version": "7.4.1"
100
+ "version": "8.1.0"
92
101
  }
93
102
  }