@scalar/openapi-parser 0.12.0 → 0.13.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 (58) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/configuration/index.d.ts +2 -2
  3. package/dist/configuration/index.js +2 -2
  4. package/dist/configuration/index.js.map +1 -1
  5. package/dist/utils/details.d.ts +1 -2
  6. package/dist/utils/details.d.ts.map +1 -1
  7. package/dist/utils/details.js +12 -9
  8. package/dist/utils/details.js.map +2 -2
  9. package/dist/utils/normalize.d.ts +1 -1
  10. package/dist/utils/normalize.d.ts.map +1 -1
  11. package/dist/utils/normalize.js +16 -11
  12. package/dist/utils/normalize.js.map +2 -2
  13. package/dist/utils/resolve-references.d.ts.map +1 -1
  14. package/dist/utils/resolve-references.js +11 -0
  15. package/dist/utils/resolve-references.js.map +2 -2
  16. package/package.json +2 -2
  17. package/dist/lib/Validator/Validator.test.js +0 -8
  18. package/dist/lib/Validator/Validator.test.js.map +0 -7
  19. package/dist/plugins/fetch-urls/fetch-urls.test.js +0 -50
  20. package/dist/plugins/fetch-urls/fetch-urls.test.js.map +0 -7
  21. package/dist/plugins/read-files/read-files.test.js +0 -20
  22. package/dist/plugins/read-files/read-files.test.js.map +0 -7
  23. package/dist/utils/dereference.test.js +0 -300
  24. package/dist/utils/dereference.test.js.map +0 -7
  25. package/dist/utils/errors.test.js +0 -48
  26. package/dist/utils/errors.test.js.map +0 -7
  27. package/dist/utils/escape-json-pointer.test.js +0 -11
  28. package/dist/utils/escape-json-pointer.test.js.map +0 -7
  29. package/dist/utils/get-entrypoint.test.js +0 -18
  30. package/dist/utils/get-entrypoint.test.js.map +0 -7
  31. package/dist/utils/get-segments-from-path.test.js +0 -13
  32. package/dist/utils/get-segments-from-path.test.js.map +0 -7
  33. package/dist/utils/is-filesystem.test.js +0 -15
  34. package/dist/utils/is-filesystem.test.js.map +0 -7
  35. package/dist/utils/is-object.test.js +0 -23
  36. package/dist/utils/is-object.test.js.map +0 -7
  37. package/dist/utils/load/load.test.js +0 -361
  38. package/dist/utils/load/load.test.js.map +0 -7
  39. package/dist/utils/normalize.test.js +0 -88
  40. package/dist/utils/normalize.test.js.map +0 -7
  41. package/dist/utils/resolve-references.test.js +0 -567
  42. package/dist/utils/resolve-references.test.js.map +0 -7
  43. package/dist/utils/transform/sanitize.test.js +0 -148
  44. package/dist/utils/transform/sanitize.test.js.map +0 -7
  45. package/dist/utils/transform-errors.test.js +0 -17
  46. package/dist/utils/transform-errors.test.js.map +0 -7
  47. package/dist/utils/traverse.test.js +0 -68
  48. package/dist/utils/traverse.test.js.map +0 -7
  49. package/dist/utils/unescape-json-pointer.test.js +0 -19
  50. package/dist/utils/unescape-json-pointer.test.js.map +0 -7
  51. package/dist/utils/upgrade-from-three-to-three-one.test.js +0 -462
  52. package/dist/utils/upgrade-from-three-to-three-one.test.js.map +0 -7
  53. package/dist/utils/upgrade-from-two-to-three.test.js +0 -589
  54. package/dist/utils/upgrade-from-two-to-three.test.js.map +0 -7
  55. package/dist/utils/upgrade.test.js +0 -57
  56. package/dist/utils/upgrade.test.js.map +0 -7
  57. package/dist/utils/validate.test.js +0 -64
  58. package/dist/utils/validate.test.js.map +0 -7
@@ -1,589 +0,0 @@
1
- import { describe, expect, it } from "vitest";
2
- import { upgradeFromTwoToThree } from "./upgrade-from-two-to-three.js";
3
- describe("upgradeFromTwoToThree", () => {
4
- it("changes the version to from 3.0.0 to 3.1.0", async () => {
5
- const result = upgradeFromTwoToThree({
6
- swagger: "2.0",
7
- info: {
8
- title: "Hello World",
9
- version: "1.0.0"
10
- },
11
- paths: {}
12
- });
13
- expect(result.openapi).toBe("3.0.4");
14
- expect(result.swagger).toBeUndefined();
15
- });
16
- it("upgrades URLs to new server syntax", async () => {
17
- const result = upgradeFromTwoToThree({
18
- swagger: "2.0",
19
- basePath: "/v1",
20
- schemes: ["http"],
21
- host: "api.example.com"
22
- });
23
- expect(result.servers).toStrictEqual([
24
- {
25
- url: "http://api.example.com/v1"
26
- }
27
- ]);
28
- expect(result.basePath).toBeUndefined();
29
- expect(result.schemes).toBeUndefined();
30
- expect(result.host).toBeUndefined();
31
- });
32
- it("upgrades basePath to new server syntax", async () => {
33
- const result = upgradeFromTwoToThree({
34
- swagger: "2.0",
35
- basePath: "/v2"
36
- });
37
- expect(result.servers).toStrictEqual([
38
- {
39
- url: "/v2"
40
- }
41
- ]);
42
- expect(result.basePath).toBeUndefined();
43
- expect(result.schemes).toBeUndefined();
44
- expect(result.host).toBeUndefined();
45
- });
46
- it("upgrades host to new server syntax", async () => {
47
- const result = upgradeFromTwoToThree({
48
- swagger: "2.0",
49
- host: "api.example.com"
50
- });
51
- expect(result.servers).toStrictEqual([
52
- {
53
- url: "http://api.example.com"
54
- }
55
- ]);
56
- expect(result.basePath).toBeUndefined();
57
- expect(result.schemes).toBeUndefined();
58
- expect(result.host).toBeUndefined();
59
- });
60
- it("moves definitions to components", async () => {
61
- const result = upgradeFromTwoToThree({
62
- swagger: "2.0",
63
- definitions: {
64
- Category: {
65
- type: "object",
66
- properties: {
67
- id: {
68
- type: "integer",
69
- format: "int64"
70
- }
71
- }
72
- }
73
- }
74
- });
75
- expect(result.components?.schemas).toStrictEqual({
76
- Category: {
77
- type: "object",
78
- properties: {
79
- id: {
80
- type: "integer",
81
- format: "int64"
82
- }
83
- }
84
- }
85
- });
86
- expect(result.definitions).toBeUndefined();
87
- });
88
- it("rewrites $refs to definitions", async () => {
89
- const result = upgradeFromTwoToThree({
90
- swagger: "2.0",
91
- paths: {
92
- "/planets": {
93
- get: {
94
- responses: {
95
- "200": {
96
- schema: {
97
- $ref: "#/definitions/Planet"
98
- }
99
- }
100
- }
101
- }
102
- }
103
- },
104
- definitions: {
105
- Planet: {
106
- type: "object",
107
- properties: {
108
- name: { type: "string" }
109
- }
110
- }
111
- }
112
- });
113
- expect(result.paths["/planets"].get.responses["200"].content["application/json"].schema.$ref).toBe(
114
- "#/components/schemas/Planet"
115
- );
116
- });
117
- it("transforms responses", async () => {
118
- const result = upgradeFromTwoToThree({
119
- swagger: "2.0",
120
- paths: {
121
- "/planets": {
122
- get: {
123
- description: "Returns all planets from the system that the user has access to",
124
- produces: ["application/json", "application/xml"],
125
- responses: {
126
- "200": {
127
- description: "A list of planets.",
128
- schema: {
129
- type: "array",
130
- items: {
131
- $ref: "#/definitions/planet"
132
- }
133
- }
134
- }
135
- }
136
- }
137
- }
138
- }
139
- });
140
- expect(result.paths).toStrictEqual({
141
- "/planets": {
142
- get: {
143
- description: "Returns all planets from the system that the user has access to",
144
- responses: {
145
- "200": {
146
- description: "A list of planets.",
147
- content: {
148
- "application/json": {
149
- schema: {
150
- type: "array",
151
- items: {
152
- $ref: "#/definitions/planet"
153
- }
154
- }
155
- },
156
- "application/xml": {
157
- schema: {
158
- type: "array",
159
- items: {
160
- $ref: "#/definitions/planet"
161
- }
162
- }
163
- }
164
- }
165
- }
166
- }
167
- }
168
- }
169
- });
170
- expect(result.paths["/planets"].get.produces).toBeUndefined();
171
- });
172
- it("uses global produces for responses", async () => {
173
- const result = upgradeFromTwoToThree({
174
- swagger: "2.0",
175
- produces: ["application/json", "application/xml"],
176
- paths: {
177
- "/planets": {
178
- get: {
179
- description: "Returns all planets from the system that the user has access to",
180
- responses: {
181
- "200": {
182
- description: "A list of planets.",
183
- schema: {
184
- type: "array",
185
- items: {
186
- $ref: "#/definitions/Planet"
187
- }
188
- }
189
- }
190
- }
191
- }
192
- }
193
- }
194
- });
195
- expect(result.paths).toStrictEqual({
196
- "/planets": {
197
- get: {
198
- description: "Returns all planets from the system that the user has access to",
199
- responses: {
200
- "200": {
201
- description: "A list of planets.",
202
- content: {
203
- "application/json": {
204
- schema: {
205
- type: "array",
206
- items: {
207
- $ref: "#/definitions/Planet"
208
- }
209
- }
210
- },
211
- "application/xml": {
212
- schema: {
213
- type: "array",
214
- items: {
215
- $ref: "#/definitions/Planet"
216
- }
217
- }
218
- }
219
- }
220
- }
221
- }
222
- }
223
- }
224
- });
225
- expect(result.paths["/planets"].get.produces).toBeUndefined();
226
- });
227
- it("transforms requestBody", async () => {
228
- const result = upgradeFromTwoToThree({
229
- swagger: "2.0",
230
- paths: {
231
- "/planets": {
232
- get: {
233
- description: "Returns all planets from the system that the user has access to",
234
- consumes: ["application/json", "application/xml"],
235
- parameters: [
236
- {
237
- in: "body",
238
- name: "body",
239
- description: "Planet object that needs to be added to the store",
240
- required: true,
241
- schema: {
242
- $ref: "#/definitions/Planet"
243
- }
244
- }
245
- ]
246
- }
247
- }
248
- }
249
- });
250
- expect(result.paths).toStrictEqual({
251
- "/planets": {
252
- get: {
253
- description: "Returns all planets from the system that the user has access to",
254
- requestBody: {
255
- description: "Planet object that needs to be added to the store",
256
- content: {
257
- "application/json": {
258
- schema: {
259
- $ref: "#/definitions/Planet"
260
- }
261
- },
262
- "application/xml": {
263
- schema: {
264
- $ref: "#/definitions/Planet"
265
- }
266
- }
267
- },
268
- required: true
269
- }
270
- }
271
- }
272
- });
273
- expect(result.paths["/planets"].get.produces).toBeUndefined();
274
- });
275
- it("uses global consumes for requestBody", async () => {
276
- const result = upgradeFromTwoToThree({
277
- swagger: "2.0",
278
- produces: ["application/json", "application/xml"],
279
- paths: {
280
- "/planets": {
281
- get: {
282
- description: "Returns all planets from the system that the user has access to",
283
- consumes: ["application/json", "application/xml"],
284
- parameters: [
285
- {
286
- in: "body",
287
- name: "body",
288
- description: "Planet object that needs to be added to the store",
289
- required: true,
290
- schema: {
291
- $ref: "#/definitions/Planet"
292
- }
293
- }
294
- ]
295
- }
296
- }
297
- }
298
- });
299
- expect(result.paths).toStrictEqual({
300
- "/planets": {
301
- get: {
302
- description: "Returns all planets from the system that the user has access to",
303
- requestBody: {
304
- description: "Planet object that needs to be added to the store",
305
- content: {
306
- "application/json": {
307
- schema: {
308
- $ref: "#/definitions/Planet"
309
- }
310
- },
311
- "application/xml": {
312
- schema: {
313
- $ref: "#/definitions/Planet"
314
- }
315
- }
316
- },
317
- required: true
318
- }
319
- }
320
- }
321
- });
322
- expect(result.paths["/planets"].get.produces).toBeUndefined();
323
- });
324
- it("migrates formData", async () => {
325
- const result = upgradeFromTwoToThree({
326
- swagger: "2.0",
327
- paths: {
328
- "/planets": {
329
- get: {
330
- description: "Returns all planets from the system that the user has access to",
331
- parameters: [
332
- {
333
- name: "additionalMetadata",
334
- in: "formData",
335
- description: "Additional data to pass to server",
336
- required: true,
337
- type: "string"
338
- }
339
- ]
340
- }
341
- }
342
- }
343
- });
344
- expect(result.paths).toStrictEqual({
345
- "/planets": {
346
- get: {
347
- description: "Returns all planets from the system that the user has access to",
348
- requestBody: {
349
- content: {
350
- "application/x-www-form-urlencoded": {
351
- schema: {
352
- required: ["additionalMetadata"],
353
- properties: {
354
- additionalMetadata: {
355
- description: "Additional data to pass to server",
356
- type: "string"
357
- }
358
- },
359
- type: "object"
360
- }
361
- }
362
- }
363
- }
364
- }
365
- }
366
- });
367
- expect(result.paths["/planets"].get.produces).toBeUndefined();
368
- });
369
- it("upgrades securityDefinitions from Swagger 2.0 to OpenAPI 3.0", () => {
370
- const input = {
371
- swagger: "2.0",
372
- securityDefinitions: {
373
- api_key: {
374
- type: "apiKey",
375
- name: "api_key",
376
- in: "header"
377
- },
378
- petstore_auth: {
379
- type: "oauth2",
380
- authorizationUrl: "https://petstore.swagger.io/oauth/authorize",
381
- flow: "implicit",
382
- scopes: {
383
- "read:pets": "read your pets",
384
- "write:pets": "modify pets in your account"
385
- }
386
- }
387
- },
388
- paths: {
389
- "/pets": {
390
- get: {
391
- summary: "List all pets",
392
- security: [
393
- {
394
- petstore_auth: ["read:pets"]
395
- }
396
- ]
397
- }
398
- }
399
- }
400
- };
401
- const result = upgradeFromTwoToThree(input);
402
- expect(result.components.securitySchemes).toStrictEqual({
403
- api_key: {
404
- type: "apiKey",
405
- name: "api_key",
406
- in: "header"
407
- },
408
- petstore_auth: {
409
- type: "oauth2",
410
- flows: {
411
- implicit: {
412
- authorizationUrl: "https://petstore.swagger.io/oauth/authorize",
413
- scopes: {
414
- "read:pets": "read your pets",
415
- "write:pets": "modify pets in your account"
416
- }
417
- }
418
- }
419
- }
420
- });
421
- expect(result.securityDefinitions).toBeUndefined();
422
- expect(result.paths["/pets"].get.security).toStrictEqual([
423
- {
424
- petstore_auth: ["read:pets"]
425
- }
426
- ]);
427
- });
428
- it("transforms parameter schemas", () => {
429
- const result = upgradeFromTwoToThree({
430
- swagger: "2.0",
431
- produces: ["application/json", "application/xml"],
432
- paths: {
433
- "/planets": {
434
- get: {
435
- description: "Returns all planets from the system that the user has access to",
436
- consumes: ["application/json", "application/xml"],
437
- parameters: [
438
- {
439
- in: "header",
440
- name: "x-custom-header",
441
- required: true,
442
- type: "string",
443
- format: "date-time",
444
- allowEmptyValue: true
445
- },
446
- {
447
- in: "query",
448
- name: "size",
449
- required: false,
450
- type: "integer",
451
- multipleOf: 2,
452
- minimum: 1,
453
- maximum: 100
454
- }
455
- ]
456
- }
457
- }
458
- }
459
- });
460
- expect(result.paths["/planets"].get.parameters).toHaveLength(2);
461
- expect(result.paths["/planets"].get.parameters[0]).toStrictEqual({
462
- in: "header",
463
- name: "x-custom-header",
464
- required: true,
465
- allowEmptyValue: true,
466
- schema: {
467
- type: "string",
468
- format: "date-time"
469
- }
470
- });
471
- expect(result.paths["/planets"].get.parameters[1]).toStrictEqual({
472
- in: "query",
473
- name: "size",
474
- required: false,
475
- schema: {
476
- type: "integer",
477
- multipleOf: 2,
478
- minimum: 1,
479
- maximum: 100
480
- }
481
- });
482
- });
483
- it("transforms basic security scheme", () => {
484
- const result = upgradeFromTwoToThree({
485
- swagger: "2.0",
486
- paths: {},
487
- securityDefinitions: {
488
- basic_auth: {
489
- type: "basic",
490
- name: "basic_auth",
491
- in: "header"
492
- }
493
- }
494
- });
495
- expect(result.components.securitySchemes.basic_auth).toStrictEqual({
496
- type: "http",
497
- scheme: "basic"
498
- });
499
- });
500
- it("transforms file type", () => {
501
- const result = upgradeFromTwoToThree({
502
- swagger: "2.0",
503
- produces: ["image/png"],
504
- paths: {
505
- "/planets": {
506
- post: {
507
- description: "Creates planet.",
508
- consumes: ["image/png"],
509
- parameters: [
510
- {
511
- in: "body",
512
- required: true,
513
- schema: {
514
- type: "file"
515
- }
516
- }
517
- ]
518
- }
519
- }
520
- }
521
- });
522
- expect(result.paths["/planets"].post.requestBody).toStrictEqual({
523
- required: true,
524
- content: {
525
- "image/png": {
526
- schema: {
527
- type: "string",
528
- format: "binary"
529
- }
530
- }
531
- }
532
- });
533
- });
534
- it("transform response headers", () => {
535
- const result = upgradeFromTwoToThree({
536
- swagger: "2.0",
537
- produces: ["application/json"],
538
- paths: {
539
- "/planets": {
540
- get: {
541
- description: "Get all planets from the system that the user has access to.",
542
- consumes: ["application/json"],
543
- responses: {
544
- "200": {
545
- description: "A list of planets.",
546
- headers: {
547
- next: {
548
- description: "link to next page",
549
- type: "string",
550
- maxLength: 100
551
- }
552
- },
553
- schema: {
554
- type: "array",
555
- items: {
556
- $ref: "#/definitions/planet"
557
- }
558
- }
559
- }
560
- }
561
- }
562
- }
563
- }
564
- });
565
- expect(result.paths["/planets"].get.responses["200"]).toStrictEqual({
566
- description: "A list of planets.",
567
- content: {
568
- "application/json": {
569
- schema: {
570
- type: "array",
571
- items: {
572
- $ref: "#/definitions/planet"
573
- }
574
- }
575
- }
576
- },
577
- headers: {
578
- next: {
579
- description: "link to next page",
580
- schema: {
581
- type: "string",
582
- maxLength: 100
583
- }
584
- }
585
- }
586
- });
587
- });
588
- });
589
- //# sourceMappingURL=upgrade-from-two-to-three.test.js.map
@@ -1,7 +0,0 @@
1
- {
2
- "version": 3,
3
- "sources": ["../../src/utils/upgrade-from-two-to-three.test.ts"],
4
- "sourcesContent": ["import { describe, expect, it } from 'vitest'\n\nimport { upgradeFromTwoToThree } from './upgrade-from-two-to-three'\n\ndescribe('upgradeFromTwoToThree', () => {\n it('changes the version to from 3.0.0 to 3.1.0', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n info: {\n title: 'Hello World',\n version: '1.0.0',\n },\n paths: {},\n })\n\n expect(result.openapi).toBe('3.0.4')\n expect(result.swagger).toBeUndefined()\n })\n\n it('upgrades URLs to new server syntax', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n basePath: '/v1',\n schemes: ['http'],\n host: 'api.example.com',\n })\n\n expect(result.servers).toStrictEqual([\n {\n url: 'http://api.example.com/v1',\n },\n ])\n\n expect(result.basePath).toBeUndefined()\n expect(result.schemes).toBeUndefined()\n expect(result.host).toBeUndefined()\n })\n\n it('upgrades basePath to new server syntax', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n basePath: '/v2',\n })\n\n expect(result.servers).toStrictEqual([\n {\n url: '/v2',\n },\n ])\n\n expect(result.basePath).toBeUndefined()\n expect(result.schemes).toBeUndefined()\n expect(result.host).toBeUndefined()\n })\n\n it('upgrades host to new server syntax', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n host: 'api.example.com',\n })\n\n expect(result.servers).toStrictEqual([\n {\n url: 'http://api.example.com',\n },\n ])\n\n expect(result.basePath).toBeUndefined()\n expect(result.schemes).toBeUndefined()\n expect(result.host).toBeUndefined()\n })\n\n it('moves definitions to components', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n definitions: {\n Category: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n },\n },\n },\n },\n })\n\n // @ts-expect-error it\u2019s fine\n expect(result.components?.schemas).toStrictEqual({\n Category: {\n type: 'object',\n properties: {\n id: {\n type: 'integer',\n format: 'int64',\n },\n },\n },\n })\n\n expect(result.definitions).toBeUndefined()\n })\n\n it('rewrites $refs to definitions', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n paths: {\n '/planets': {\n get: {\n responses: {\n '200': {\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n },\n },\n },\n definitions: {\n Planet: {\n type: 'object',\n properties: {\n name: { type: 'string' },\n },\n },\n },\n })\n expect(result.paths['/planets'].get.responses['200'].content['application/json'].schema.$ref).toBe(\n '#/components/schemas/Planet',\n )\n })\n\n it('transforms responses', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n produces: ['application/json', 'application/xml'],\n responses: {\n '200': {\n description: 'A list of planets.',\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/planet',\n },\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths).toStrictEqual({\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n responses: {\n '200': {\n description: 'A list of planets.',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/planet',\n },\n },\n },\n 'application/xml': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/planet',\n },\n },\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.produces).toBeUndefined()\n })\n\n it('uses global produces for responses', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n produces: ['application/json', 'application/xml'],\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n responses: {\n '200': {\n description: 'A list of planets.',\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths).toStrictEqual({\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n responses: {\n '200': {\n description: 'A list of planets.',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n 'application/xml': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.produces).toBeUndefined()\n })\n\n it('transforms requestBody', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n consumes: ['application/json', 'application/xml'],\n parameters: [\n {\n in: 'body',\n name: 'body',\n description: 'Planet object that needs to be added to the store',\n required: true,\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n ],\n },\n },\n },\n })\n\n expect(result.paths).toStrictEqual({\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n requestBody: {\n description: 'Planet object that needs to be added to the store',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n 'application/xml': {\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n required: true,\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.produces).toBeUndefined()\n })\n\n it('uses global consumes for requestBody', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n produces: ['application/json', 'application/xml'],\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n consumes: ['application/json', 'application/xml'],\n parameters: [\n {\n in: 'body',\n name: 'body',\n description: 'Planet object that needs to be added to the store',\n required: true,\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n ],\n },\n },\n },\n })\n\n expect(result.paths).toStrictEqual({\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n requestBody: {\n description: 'Planet object that needs to be added to the store',\n content: {\n 'application/json': {\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n 'application/xml': {\n schema: {\n $ref: '#/definitions/Planet',\n },\n },\n },\n required: true,\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.produces).toBeUndefined()\n })\n\n it('migrates formData', async () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n parameters: [\n {\n name: 'additionalMetadata',\n in: 'formData',\n description: 'Additional data to pass to server',\n required: true,\n type: 'string',\n },\n ],\n },\n },\n },\n })\n\n expect(result.paths).toStrictEqual({\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n requestBody: {\n content: {\n 'application/x-www-form-urlencoded': {\n schema: {\n required: ['additionalMetadata'],\n properties: {\n additionalMetadata: {\n description: 'Additional data to pass to server',\n type: 'string',\n },\n },\n type: 'object',\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.produces).toBeUndefined()\n })\n\n it('upgrades securityDefinitions from Swagger 2.0 to OpenAPI 3.0', () => {\n const input = {\n swagger: '2.0',\n securityDefinitions: {\n api_key: {\n type: 'apiKey',\n name: 'api_key',\n in: 'header',\n },\n petstore_auth: {\n type: 'oauth2',\n authorizationUrl: 'https://petstore.swagger.io/oauth/authorize',\n flow: 'implicit',\n scopes: {\n 'read:pets': 'read your pets',\n 'write:pets': 'modify pets in your account',\n },\n },\n },\n paths: {\n '/pets': {\n get: {\n summary: 'List all pets',\n security: [\n {\n petstore_auth: ['read:pets'],\n },\n ],\n },\n },\n },\n }\n\n const result = upgradeFromTwoToThree(input)\n\n // @ts-expect-error it\u2019s fine\n expect(result.components.securitySchemes).toStrictEqual({\n api_key: {\n type: 'apiKey',\n name: 'api_key',\n in: 'header',\n },\n petstore_auth: {\n type: 'oauth2',\n flows: {\n implicit: {\n authorizationUrl: 'https://petstore.swagger.io/oauth/authorize',\n scopes: {\n 'read:pets': 'read your pets',\n 'write:pets': 'modify pets in your account',\n },\n },\n },\n },\n })\n\n expect(result.securityDefinitions).toBeUndefined()\n\n // Check if the security attribute in the operation is upgraded\n expect(result.paths['/pets'].get.security).toStrictEqual([\n {\n petstore_auth: ['read:pets'],\n },\n ])\n })\n\n it('transforms parameter schemas', () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n produces: ['application/json', 'application/xml'],\n paths: {\n '/planets': {\n get: {\n description: 'Returns all planets from the system that the user has access to',\n consumes: ['application/json', 'application/xml'],\n parameters: [\n {\n in: 'header',\n name: 'x-custom-header',\n required: true,\n type: 'string',\n format: 'date-time',\n allowEmptyValue: true,\n },\n {\n in: 'query',\n name: 'size',\n required: false,\n type: 'integer',\n multipleOf: 2,\n minimum: 1,\n maximum: 100,\n },\n ],\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.parameters).toHaveLength(2)\n expect(result.paths['/planets'].get.parameters[0]).toStrictEqual({\n in: 'header',\n name: 'x-custom-header',\n required: true,\n allowEmptyValue: true,\n schema: {\n type: 'string',\n format: 'date-time',\n },\n })\n expect(result.paths['/planets'].get.parameters[1]).toStrictEqual({\n in: 'query',\n name: 'size',\n required: false,\n schema: {\n type: 'integer',\n multipleOf: 2,\n minimum: 1,\n maximum: 100,\n },\n })\n })\n\n it('transforms basic security scheme', () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n paths: {},\n securityDefinitions: {\n basic_auth: {\n type: 'basic',\n name: 'basic_auth',\n in: 'header',\n },\n },\n })\n\n // @ts-expect-error it\u2019s fine\n expect(result.components.securitySchemes.basic_auth).toStrictEqual({\n type: 'http',\n scheme: 'basic',\n })\n })\n\n it('transforms file type', () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n produces: ['image/png'],\n paths: {\n '/planets': {\n post: {\n description: 'Creates planet.',\n consumes: ['image/png'],\n parameters: [\n {\n in: 'body',\n required: true,\n schema: {\n type: 'file',\n },\n },\n ],\n },\n },\n },\n })\n\n expect(result.paths['/planets'].post.requestBody).toStrictEqual({\n required: true,\n content: {\n 'image/png': {\n schema: {\n type: 'string',\n format: 'binary',\n },\n },\n },\n })\n })\n\n it('transform response headers', () => {\n const result = upgradeFromTwoToThree({\n swagger: '2.0',\n produces: ['application/json'],\n paths: {\n '/planets': {\n get: {\n description: 'Get all planets from the system that the user has access to.',\n consumes: ['application/json'],\n responses: {\n '200': {\n description: 'A list of planets.',\n headers: {\n next: {\n description: 'link to next page',\n type: 'string',\n maxLength: 100,\n },\n },\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/planet',\n },\n },\n },\n },\n },\n },\n },\n })\n\n expect(result.paths['/planets'].get.responses['200']).toStrictEqual({\n description: 'A list of planets.',\n content: {\n 'application/json': {\n schema: {\n type: 'array',\n items: {\n $ref: '#/definitions/planet',\n },\n },\n },\n },\n headers: {\n next: {\n description: 'link to next page',\n schema: {\n type: 'string',\n maxLength: 100,\n },\n },\n },\n })\n })\n})\n"],
5
- "mappings": "AAAA,SAAS,UAAU,QAAQ,UAAU;AAErC,SAAS,6BAA6B;AAEtC,SAAS,yBAAyB,MAAM;AACtC,KAAG,8CAA8C,YAAY;AAC3D,UAAM,SAAS,sBAAsB;AAAA,MACnC,SAAS;AAAA,MACT,MAAM;AAAA,QACJ,OAAO;AAAA,QACP,SAAS;AAAA,MACX;AAAA,MACA,OAAO,CAAC;AAAA,IACV,CAAC;AAED,WAAO,OAAO,OAAO,EAAE,KAAK,OAAO;AACnC,WAAO,OAAO,OAAO,EAAE,cAAc;AAAA,EACvC,CAAC;AAED,KAAG,sCAAsC,YAAY;AACnD,UAAM,SAAS,sBAAsB;AAAA,MACnC,SAAS;AAAA,MACT,UAAU;AAAA,MACV,SAAS,CAAC,MAAM;AAAA,MAChB,MAAM;AAAA,IACR,CAAC;AAED,WAAO,OAAO,OAAO,EAAE,cAAc;AAAA,MACnC;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IACF,CAAC;AAED,WAAO,OAAO,QAAQ,EAAE,cAAc;AACtC,WAAO,OAAO,OAAO,EAAE,cAAc;AACrC,WAAO,OAAO,IAAI,EAAE,cAAc;AAAA,EACpC,CAAC;AAED,KAAG,0CAA0C,YAAY;AACvD,UAAM,SAAS,sBAAsB;AAAA,MACnC,SAAS;AAAA,MACT,UAAU;AAAA,IACZ,CAAC;AAED,WAAO,OAAO,OAAO,EAAE,cAAc;AAAA,MACnC;AAAA,QACE,KAAK;AAAA,MACP;AAAA,IACF,CAAC;AAED,WAAO,OAAO,QAAQ,EAAE,cAAc;AACtC,WAAO,OAAO,OAAO,EAAE,cAAc;AACrC,WAAO,OAAO,IAAI,EAAE,cAAc;AAAA,EACpC,CAAC;AAED,KAAG,sCAAsC,YAAY;AACnD,UAAM,SAAS,sBAAsB;AAAA,MACnC,SAAS;AAAA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