@trayio/tray-openapi 5.35.0-unstable.fd7158a → 6.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.
Files changed (41) hide show
  1. package/dist/OpenApiCodecs.d.ts +4 -207
  2. package/dist/OpenApiCodecs.d.ts.map +1 -1
  3. package/dist/OpenApiCodecs.js +3 -3
  4. package/dist/OpenApiSchemaImporter.d.ts +2 -2
  5. package/dist/OpenApiSchemaImporter.d.ts.map +1 -1
  6. package/dist/OpenApiSchemaImporter.js +55 -33
  7. package/dist/OpenApiSchemaImporter.unit.test.js +13 -24
  8. package/dist/OpenApiSchemaTransformer.d.ts +2 -2
  9. package/dist/OpenApiSchemaTransformer.d.ts.map +1 -1
  10. package/dist/OpenApiSchemaTransformer.js +25 -2
  11. package/dist/OpenApiSchemaTransformer.unit.test.js +44 -30
  12. package/dist/OpenApiTypeDescriptors.d.ts +32 -389
  13. package/dist/OpenApiTypeDescriptors.d.ts.map +1 -1
  14. package/dist/OpenApiTypeDescriptors.js +109 -80
  15. package/dist/file-generators/GenerateHandler.d.ts +2 -2
  16. package/dist/file-generators/GenerateHandler.d.ts.map +1 -1
  17. package/dist/file-generators/GenerateHandler.js +78 -75
  18. package/dist/file-generators/GenerateHandler.unit.test.js +97 -73
  19. package/dist/file-generators/GenerateHandlerTest.d.ts +2 -2
  20. package/dist/file-generators/GenerateHandlerTest.d.ts.map +1 -1
  21. package/dist/file-generators/GenerateHandlerTest.js +76 -69
  22. package/dist/file-generators/GenerateHandlerTest.unit.test.js +230 -206
  23. package/dist/file-generators/GenerateOperationJson.d.ts +2 -2
  24. package/dist/file-generators/GenerateOperationJson.d.ts.map +1 -1
  25. package/dist/file-generators/GenerateOperationJson.js +29 -4
  26. package/dist/file-generators/GenerateOperationJson.unit.test.js +49 -25
  27. package/dist/file-generators/SchemaGenerator.d.ts.map +1 -1
  28. package/dist/file-generators/SchemaGenerator.js +37 -14
  29. package/dist/file-generators/types/GenerateInputSchema.d.ts +2 -2
  30. package/dist/file-generators/types/GenerateInputSchema.d.ts.map +1 -1
  31. package/dist/file-generators/types/GenerateInputSchema.js +95 -88
  32. package/dist/file-generators/types/GenerateInputSchema.test.js +91 -60
  33. package/dist/file-generators/types/GenerateInputType.test.js +169 -143
  34. package/dist/file-generators/types/GenerateInputTypes.d.ts +2 -2
  35. package/dist/file-generators/types/GenerateInputTypes.d.ts.map +1 -1
  36. package/dist/file-generators/types/GenerateInputTypes.js +28 -7
  37. package/dist/file-generators/types/GenerateOutput.d.ts +6 -4
  38. package/dist/file-generators/types/GenerateOutput.d.ts.map +1 -1
  39. package/dist/file-generators/types/GenerateOutput.js +57 -46
  40. package/dist/file-generators/types/GenerateOutput.test.js +62 -35
  41. package/package.json +8 -6
@@ -1,6 +1,29 @@
1
1
  "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
2
25
  Object.defineProperty(exports, "__esModule", { value: true });
3
- const effect_1 = require("effect");
26
+ const E = __importStar(require("fp-ts/Either"));
4
27
  const OpenApiSchemaTransformer_1 = require("./OpenApiSchemaTransformer");
5
28
  describe('mergePathLevelParamsIntoHttpMethod', () => {
6
29
  it('should merge path level parameters into HTTP methods', () => {
@@ -26,17 +49,14 @@ describe('mergePathLevelParamsIntoHttpMethod', () => {
26
49
  },
27
50
  };
28
51
  const result = (0, OpenApiSchemaTransformer_1.mergePathLevelParamsIntoHttpMethod)(openApiSpec);
29
- effect_1.Either.match(result, {
30
- onLeft: (error) => {
31
- throw new Error(`Test failed with error: ${error.message}`);
32
- },
33
- onRight: (updatedOpenApiSpec) => {
34
- expect(updatedOpenApiSpec.paths['/path'].get.parameters).toEqual([
35
- { name: 'param2', in: 'query', required: true },
36
- { name: 'param1', in: 'query', required: false },
37
- ]);
38
- },
39
- });
52
+ E.fold((error) => {
53
+ throw new Error(`Test failed with error: ${error.message}`);
54
+ }, (updatedOpenApiSpec) => {
55
+ expect(updatedOpenApiSpec.paths['/path'].get.parameters).toEqual([
56
+ { name: 'param2', in: 'query', required: true },
57
+ { name: 'param1', in: 'query', required: false },
58
+ ]);
59
+ })(result);
40
60
  });
41
61
  it('should return the original spec if no top level parameters', () => {
42
62
  const openApiSpec = {
@@ -60,14 +80,11 @@ describe('mergePathLevelParamsIntoHttpMethod', () => {
60
80
  },
61
81
  };
62
82
  const result = (0, OpenApiSchemaTransformer_1.mergePathLevelParamsIntoHttpMethod)(openApiSpec);
63
- effect_1.Either.match(result, {
64
- onLeft: (error) => {
65
- throw new Error(`Test failed with error: ${error.message}`);
66
- },
67
- onRight: (updatedOpenApiSpec) => {
68
- expect(updatedOpenApiSpec).toEqual(openApiSpec);
69
- },
70
- });
83
+ E.fold((error) => {
84
+ throw new Error(`Test failed with error: ${error.message}`);
85
+ }, (updatedOpenApiSpec) => {
86
+ expect(updatedOpenApiSpec).toEqual(openApiSpec);
87
+ })(result);
71
88
  });
72
89
  it('should add path level parameters into HTTP methods, if no method params already exist', () => {
73
90
  const openApiSpec = {
@@ -90,15 +107,12 @@ describe('mergePathLevelParamsIntoHttpMethod', () => {
90
107
  },
91
108
  };
92
109
  const result = (0, OpenApiSchemaTransformer_1.mergePathLevelParamsIntoHttpMethod)(openApiSpec);
93
- effect_1.Either.match(result, {
94
- onLeft: (error) => {
95
- throw new Error(`Test failed with error: ${error.message}`);
96
- },
97
- onRight: (updatedOpenApiSpec) => {
98
- expect(updatedOpenApiSpec.paths['/path'].get.parameters).toEqual([
99
- { name: 'param1', in: 'query', required: false },
100
- ]);
101
- },
102
- });
110
+ E.fold((error) => {
111
+ throw new Error(`Test failed with error: ${error.message}`);
112
+ }, (updatedOpenApiSpec) => {
113
+ expect(updatedOpenApiSpec.paths['/path'].get.parameters).toEqual([
114
+ { name: 'param1', in: 'query', required: false },
115
+ ]);
116
+ })(result);
103
117
  });
104
118
  });
@@ -1,4 +1,5 @@
1
- import { Option, Schema } from 'effect';
1
+ import * as t from 'io-ts';
2
+ import * as O from 'fp-ts/Option';
2
3
  export type FlatPath = {
3
4
  path: string;
4
5
  routes: {
@@ -36,35 +37,35 @@ export type BuildConnectorResponse = {
36
37
  errors: OperationError[];
37
38
  };
38
39
  export type Path = {
39
- description: Option.Option<string>;
40
- summary: Option.Option<string>;
41
- tags: Option.Option<string[]>;
40
+ description: O.Option<string>;
41
+ summary: O.Option<string>;
42
+ tags: O.Option<string[]>;
42
43
  operationId: string;
43
- parameters: Option.Option<Parameter[]>;
44
- requestBody: Option.Option<RequestBody>;
45
- responses: Option.Option<Responses>;
44
+ parameters: O.Option<Parameter[]>;
45
+ requestBody: O.Option<RequestBody>;
46
+ responses: O.Option<Responses>;
46
47
  };
47
48
  export type Parameter = {
48
49
  name: string;
49
50
  in: string;
50
- description: Option.Option<string>;
51
- required: Option.Option<boolean>;
51
+ description: O.Option<string>;
52
+ required: O.Option<boolean>;
52
53
  schema: SchemaObject;
53
54
  };
54
55
  export type RequestBody = {
55
56
  content: Record<string, MediaTypeObject>;
56
57
  };
57
58
  export interface MediaTypeObject {
58
- schema: Option.Option<SchemaObject>;
59
+ schema: O.Option<SchemaObject>;
59
60
  }
60
61
  export type Responses = Record<string, Response>;
61
62
  export type Response = {
62
63
  description: string;
63
- content: Option.Option<Record<string, MediaTypeObject>>;
64
+ content: O.Option<Record<string, MediaTypeObject>>;
64
65
  };
65
66
  export type OpenApiHttpMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
66
67
  type ComponentSchema = {
67
- schemas: Option.Option<Record<string, SchemaObject>>;
68
+ schemas: O.Option<Record<string, SchemaObject>>;
68
69
  };
69
70
  export type OpenAPISchema = {
70
71
  openapi: string;
@@ -81,391 +82,33 @@ export type OpenAPISchema = {
81
82
  };
82
83
  export type SchemaObject = ArraySchemaObject | NonArraySchemaObject;
83
84
  export interface ArraySchemaObject extends BaseSchemaObject {
84
- type: Option.Option<'array'>;
85
+ type: O.Option<'array'>;
85
86
  items: SchemaObject;
86
87
  }
87
88
  export type SchemaObjectType = 'array' | NonArraySchemaObjectType;
88
89
  export type NonArraySchemaObjectType = 'boolean' | 'object' | 'number' | 'string' | 'integer';
89
90
  export interface NonArraySchemaObject extends BaseSchemaObject {
90
- type: Option.Option<NonArraySchemaObjectType>;
91
+ type: O.Option<NonArraySchemaObjectType>;
91
92
  }
92
93
  export type BaseSchemaObject = {
93
- title: Option.Option<string>;
94
- additionalProperties: Option.Option<boolean | SchemaObject>;
95
- properties: Option.Option<Record<string, SchemaObject>>;
96
- required: Option.Option<string[]>;
97
- allOf: Option.Option<SchemaObject[]>;
98
- oneOf: Option.Option<SchemaObject[]>;
99
- anyOf: Option.Option<SchemaObject[]>;
100
- not: Option.Option<SchemaObject>;
101
- in: Option.Option<string>;
102
- nullable: Option.Option<boolean>;
103
- default: Option.Option<string | number | boolean | Array<string | number | boolean>>;
104
- enum: Option.Option<Array<string | number | boolean>>;
94
+ title: O.Option<string>;
95
+ additionalProperties: O.Option<boolean | SchemaObject>;
96
+ properties: O.Option<Record<string, SchemaObject>>;
97
+ required: O.Option<string[]>;
98
+ allOf: O.Option<SchemaObject[]>;
99
+ oneOf: O.Option<SchemaObject[]>;
100
+ anyOf: O.Option<SchemaObject[]>;
101
+ not: O.Option<SchemaObject>;
102
+ in: O.Option<string>;
103
+ nullable: O.Option<boolean>;
104
+ default: O.Option<string | number | boolean | Array<string | number | boolean>>;
105
+ enum: O.Option<Array<string | number | boolean>>;
105
106
  };
106
- export declare const baseSchemaObjectSchema: Schema.Struct<{
107
- title: Schema.OptionFromNullishOr<typeof Schema.String>;
108
- additionalProperties: Schema.OptionFromNullishOr<Schema.Union<[typeof Schema.Boolean, Schema.suspend<SchemaObject, any, never>]>>;
109
- properties: Schema.OptionFromNullishOr<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.suspend<SchemaObject, any, never>>>>;
110
- required: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
111
- allOf: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<Schema.suspend<SchemaObject, any, never>>>>;
112
- oneOf: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<Schema.suspend<SchemaObject, any, never>>>>;
113
- anyOf: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<Schema.suspend<SchemaObject, any, never>>>>;
114
- not: Schema.OptionFromNullishOr<Schema.suspend<SchemaObject, any, never>>;
115
- in: Schema.OptionFromNullishOr<typeof Schema.String>;
116
- nullable: Schema.OptionFromNullishOr<typeof Schema.Boolean>;
117
- default: Schema.OptionFromNullishOr<Schema.Union<[typeof Schema.String, typeof Schema.Number, typeof Schema.Boolean, Schema.mutable<Schema.Array$<Schema.Union<[typeof Schema.String, typeof Schema.Number, typeof Schema.Boolean]>>>]>>;
118
- enum: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<Schema.Union<[typeof Schema.String, typeof Schema.Number, typeof Schema.Boolean]>>>>;
119
- }>;
120
- export declare const schemaObjectSchema: Schema.Schema<SchemaObject, any>;
107
+ export declare const baseSchemaObjectSchemaTypeDescriptor: t.Type<BaseSchemaObject, unknown>;
108
+ export declare const schemaObjectTypeDescriptor: t.Type<SchemaObject, unknown>;
121
109
  export declare const schemaObjectTypeCodec: import("@trayio/commons/dist/codec/Codec").Codec<SchemaObject>;
122
- export declare const parameterSchemaSchema: Schema.Struct<{
123
- name: typeof Schema.String;
124
- in: typeof Schema.String;
125
- description: Schema.OptionFromNullishOr<typeof Schema.String>;
126
- required: Schema.OptionFromNullishOr<typeof Schema.Boolean>;
127
- schema: Schema.Schema<SchemaObject, any, never>;
128
- }>;
129
- export declare const openApiSpecPathSchema: Schema.Struct<{
130
- description: Schema.OptionFromNullishOr<typeof Schema.String>;
131
- summary: Schema.OptionFromNullishOr<typeof Schema.String>;
132
- tags: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<typeof Schema.String>>>;
133
- operationId: typeof Schema.String;
134
- parameters: Schema.OptionFromNullishOr<Schema.mutable<Schema.Array$<Schema.Struct<{
135
- name: typeof Schema.String;
136
- in: typeof Schema.String;
137
- description: Schema.OptionFromNullishOr<typeof Schema.String>;
138
- required: Schema.OptionFromNullishOr<typeof Schema.Boolean>;
139
- schema: Schema.Schema<SchemaObject, any, never>;
140
- }>>>>;
141
- requestBody: Schema.OptionFromNullishOr<Schema.Struct<{
142
- content: Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Struct<{
143
- schema: Schema.OptionFromNullishOr<Schema.Schema<SchemaObject, any, never>>;
144
- }>>>;
145
- }>>;
146
- responses: Schema.OptionFromNullishOr<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Struct<{
147
- description: typeof Schema.String;
148
- content: Schema.OptionFromNullishOr<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Struct<{
149
- schema: Schema.OptionFromNullishOr<Schema.Schema<SchemaObject, any, never>>;
150
- }>>>>;
151
- }>>>>;
152
- }>;
153
- export declare const openApiSpecSchema: Schema.Struct<{
154
- openapi: typeof Schema.String;
155
- info: Schema.Struct<{
156
- title: typeof Schema.String;
157
- description: typeof Schema.String;
158
- version: typeof Schema.String;
159
- }>;
160
- servers: Schema.mutable<Schema.Array$<Schema.Struct<{
161
- url: typeof Schema.String;
162
- }>>>;
163
- paths: Schema.mutable<Schema.Record$<typeof Schema.String, Schema.SchemaClass<{
164
- readonly get?: {
165
- readonly description: Option.Option<string>;
166
- readonly summary: Option.Option<string>;
167
- readonly tags: Option.Option<string[]>;
168
- readonly operationId: string;
169
- readonly parameters: Option.Option<{
170
- readonly required: Option.Option<boolean>;
171
- readonly in: string;
172
- readonly schema: SchemaObject;
173
- readonly description: Option.Option<string>;
174
- readonly name: string;
175
- }[]>;
176
- readonly requestBody: Option.Option<{
177
- readonly content: {
178
- [x: string]: {
179
- readonly schema: Option.Option<SchemaObject>;
180
- };
181
- };
182
- }>;
183
- readonly responses: Option.Option<{
184
- [x: string]: {
185
- readonly content: Option.Option<{
186
- [x: string]: {
187
- readonly schema: Option.Option<SchemaObject>;
188
- };
189
- }>;
190
- readonly description: string;
191
- };
192
- }>;
193
- } | undefined;
194
- readonly post?: {
195
- readonly description: Option.Option<string>;
196
- readonly summary: Option.Option<string>;
197
- readonly tags: Option.Option<string[]>;
198
- readonly operationId: string;
199
- readonly parameters: Option.Option<{
200
- readonly required: Option.Option<boolean>;
201
- readonly in: string;
202
- readonly schema: SchemaObject;
203
- readonly description: Option.Option<string>;
204
- readonly name: string;
205
- }[]>;
206
- readonly requestBody: Option.Option<{
207
- readonly content: {
208
- [x: string]: {
209
- readonly schema: Option.Option<SchemaObject>;
210
- };
211
- };
212
- }>;
213
- readonly responses: Option.Option<{
214
- [x: string]: {
215
- readonly content: Option.Option<{
216
- [x: string]: {
217
- readonly schema: Option.Option<SchemaObject>;
218
- };
219
- }>;
220
- readonly description: string;
221
- };
222
- }>;
223
- } | undefined;
224
- readonly put?: {
225
- readonly description: Option.Option<string>;
226
- readonly summary: Option.Option<string>;
227
- readonly tags: Option.Option<string[]>;
228
- readonly operationId: string;
229
- readonly parameters: Option.Option<{
230
- readonly required: Option.Option<boolean>;
231
- readonly in: string;
232
- readonly schema: SchemaObject;
233
- readonly description: Option.Option<string>;
234
- readonly name: string;
235
- }[]>;
236
- readonly requestBody: Option.Option<{
237
- readonly content: {
238
- [x: string]: {
239
- readonly schema: Option.Option<SchemaObject>;
240
- };
241
- };
242
- }>;
243
- readonly responses: Option.Option<{
244
- [x: string]: {
245
- readonly content: Option.Option<{
246
- [x: string]: {
247
- readonly schema: Option.Option<SchemaObject>;
248
- };
249
- }>;
250
- readonly description: string;
251
- };
252
- }>;
253
- } | undefined;
254
- readonly patch?: {
255
- readonly description: Option.Option<string>;
256
- readonly summary: Option.Option<string>;
257
- readonly tags: Option.Option<string[]>;
258
- readonly operationId: string;
259
- readonly parameters: Option.Option<{
260
- readonly required: Option.Option<boolean>;
261
- readonly in: string;
262
- readonly schema: SchemaObject;
263
- readonly description: Option.Option<string>;
264
- readonly name: string;
265
- }[]>;
266
- readonly requestBody: Option.Option<{
267
- readonly content: {
268
- [x: string]: {
269
- readonly schema: Option.Option<SchemaObject>;
270
- };
271
- };
272
- }>;
273
- readonly responses: Option.Option<{
274
- [x: string]: {
275
- readonly content: Option.Option<{
276
- [x: string]: {
277
- readonly schema: Option.Option<SchemaObject>;
278
- };
279
- }>;
280
- readonly description: string;
281
- };
282
- }>;
283
- } | undefined;
284
- readonly delete?: {
285
- readonly description: Option.Option<string>;
286
- readonly summary: Option.Option<string>;
287
- readonly tags: Option.Option<string[]>;
288
- readonly operationId: string;
289
- readonly parameters: Option.Option<{
290
- readonly required: Option.Option<boolean>;
291
- readonly in: string;
292
- readonly schema: SchemaObject;
293
- readonly description: Option.Option<string>;
294
- readonly name: string;
295
- }[]>;
296
- readonly requestBody: Option.Option<{
297
- readonly content: {
298
- [x: string]: {
299
- readonly schema: Option.Option<SchemaObject>;
300
- };
301
- };
302
- }>;
303
- readonly responses: Option.Option<{
304
- [x: string]: {
305
- readonly content: Option.Option<{
306
- [x: string]: {
307
- readonly schema: Option.Option<SchemaObject>;
308
- };
309
- }>;
310
- readonly description: string;
311
- };
312
- }>;
313
- } | undefined;
314
- }, {
315
- readonly get?: {
316
- readonly description: string | null | undefined;
317
- readonly summary: string | null | undefined;
318
- readonly tags: string[] | null | undefined;
319
- readonly operationId: string;
320
- readonly parameters: {
321
- readonly required: boolean | null | undefined;
322
- readonly in: string;
323
- readonly schema: any;
324
- readonly description: string | null | undefined;
325
- readonly name: string;
326
- }[] | null | undefined;
327
- readonly requestBody: {
328
- readonly content: {
329
- [x: string]: {
330
- readonly schema: any;
331
- };
332
- };
333
- } | null | undefined;
334
- readonly responses: {
335
- [x: string]: {
336
- readonly content: {
337
- [x: string]: {
338
- readonly schema: any;
339
- };
340
- } | null | undefined;
341
- readonly description: string;
342
- };
343
- } | null | undefined;
344
- } | undefined;
345
- readonly post?: {
346
- readonly description: string | null | undefined;
347
- readonly summary: string | null | undefined;
348
- readonly tags: string[] | null | undefined;
349
- readonly operationId: string;
350
- readonly parameters: {
351
- readonly required: boolean | null | undefined;
352
- readonly in: string;
353
- readonly schema: any;
354
- readonly description: string | null | undefined;
355
- readonly name: string;
356
- }[] | null | undefined;
357
- readonly requestBody: {
358
- readonly content: {
359
- [x: string]: {
360
- readonly schema: any;
361
- };
362
- };
363
- } | null | undefined;
364
- readonly responses: {
365
- [x: string]: {
366
- readonly content: {
367
- [x: string]: {
368
- readonly schema: any;
369
- };
370
- } | null | undefined;
371
- readonly description: string;
372
- };
373
- } | null | undefined;
374
- } | undefined;
375
- readonly put?: {
376
- readonly description: string | null | undefined;
377
- readonly summary: string | null | undefined;
378
- readonly tags: string[] | null | undefined;
379
- readonly operationId: string;
380
- readonly parameters: {
381
- readonly required: boolean | null | undefined;
382
- readonly in: string;
383
- readonly schema: any;
384
- readonly description: string | null | undefined;
385
- readonly name: string;
386
- }[] | null | undefined;
387
- readonly requestBody: {
388
- readonly content: {
389
- [x: string]: {
390
- readonly schema: any;
391
- };
392
- };
393
- } | null | undefined;
394
- readonly responses: {
395
- [x: string]: {
396
- readonly content: {
397
- [x: string]: {
398
- readonly schema: any;
399
- };
400
- } | null | undefined;
401
- readonly description: string;
402
- };
403
- } | null | undefined;
404
- } | undefined;
405
- readonly patch?: {
406
- readonly description: string | null | undefined;
407
- readonly summary: string | null | undefined;
408
- readonly tags: string[] | null | undefined;
409
- readonly operationId: string;
410
- readonly parameters: {
411
- readonly required: boolean | null | undefined;
412
- readonly in: string;
413
- readonly schema: any;
414
- readonly description: string | null | undefined;
415
- readonly name: string;
416
- }[] | null | undefined;
417
- readonly requestBody: {
418
- readonly content: {
419
- [x: string]: {
420
- readonly schema: any;
421
- };
422
- };
423
- } | null | undefined;
424
- readonly responses: {
425
- [x: string]: {
426
- readonly content: {
427
- [x: string]: {
428
- readonly schema: any;
429
- };
430
- } | null | undefined;
431
- readonly description: string;
432
- };
433
- } | null | undefined;
434
- } | undefined;
435
- readonly delete?: {
436
- readonly description: string | null | undefined;
437
- readonly summary: string | null | undefined;
438
- readonly tags: string[] | null | undefined;
439
- readonly operationId: string;
440
- readonly parameters: {
441
- readonly required: boolean | null | undefined;
442
- readonly in: string;
443
- readonly schema: any;
444
- readonly description: string | null | undefined;
445
- readonly name: string;
446
- }[] | null | undefined;
447
- readonly requestBody: {
448
- readonly content: {
449
- [x: string]: {
450
- readonly schema: any;
451
- };
452
- };
453
- } | null | undefined;
454
- readonly responses: {
455
- [x: string]: {
456
- readonly content: {
457
- [x: string]: {
458
- readonly schema: any;
459
- };
460
- } | null | undefined;
461
- readonly description: string;
462
- };
463
- } | null | undefined;
464
- } | undefined;
465
- }, never>>>;
466
- components: Schema.Struct<{
467
- schemas: Schema.OptionFromNullishOr<Schema.mutable<Schema.Record$<typeof Schema.String, Schema.Schema<SchemaObject, any, never>>>>;
468
- }>;
469
- }>;
110
+ export declare const parameterSchemaTypeDescriptor: t.Type<Parameter, unknown>;
111
+ export declare const openApiSpecPathTypeDescriptor: t.Type<Path, unknown>;
112
+ export declare const openApiSpecTypeDescriptor: t.Type<OpenAPISchema, unknown>;
470
113
  export {};
471
114
  //# sourceMappingURL=O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