@scalar/openapi-parser 0.10.8 → 0.10.10

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/CHANGELOG.md +12 -0
  2. package/README.md +4 -3
  3. package/dist/configuration/index.d.ts.map +1 -1
  4. package/dist/lib/Validator/Validator.d.ts.map +1 -1
  5. package/dist/plugins/fetch-urls/fetchUrls.d.ts.map +1 -1
  6. package/dist/plugins/fetch-urls/fetchUrls.js +2 -5
  7. package/dist/utils/betterAjvErrors/index.d.ts.map +1 -1
  8. package/dist/utils/betterAjvErrors/utils.d.ts.map +1 -1
  9. package/dist/utils/betterAjvErrors/validation-errors/enum.js +4 -12
  10. package/dist/utils/dereference.d.ts.map +1 -1
  11. package/dist/utils/filter.d.ts.map +1 -1
  12. package/dist/utils/getEntrypoint.d.ts.map +1 -1
  13. package/dist/utils/getListOfReferences.d.ts.map +1 -1
  14. package/dist/utils/getListOfReferences.js +1 -3
  15. package/dist/utils/isObject.d.ts.map +1 -1
  16. package/dist/utils/load/load.d.ts.map +1 -1
  17. package/dist/utils/load/load.js +1 -3
  18. package/dist/utils/normalize.d.ts.map +1 -1
  19. package/dist/utils/openapi/actions/details.d.ts.map +1 -1
  20. package/dist/utils/openapi/actions/files.d.ts.map +1 -1
  21. package/dist/utils/openapi/actions/get.d.ts.map +1 -1
  22. package/dist/utils/openapi/actions/toJson.d.ts.map +1 -1
  23. package/dist/utils/openapi/actions/toYaml.d.ts.map +1 -1
  24. package/dist/utils/openapi/openapi.d.ts.map +1 -1
  25. package/dist/utils/openapi/utils/workThroughQueue.d.ts.map +1 -1
  26. package/dist/utils/resolveReferences.d.ts.map +1 -1
  27. package/dist/utils/resolveReferences.js +1 -2
  28. package/dist/utils/transform/utils/addMissingTags.d.ts.map +1 -1
  29. package/dist/utils/transform/utils/addMissingTags.js +4 -11
  30. package/dist/utils/transform/utils/normalizeSecuritySchemes.d.ts.map +1 -1
  31. package/dist/utils/transform/utils/normalizeSecuritySchemes.js +1 -4
  32. package/dist/utils/transform/utils/rejectSwaggerDocuments.d.ts.map +1 -1
  33. package/dist/utils/traverse.d.ts.map +1 -1
  34. package/dist/utils/traverse.js +1 -3
  35. package/dist/utils/upgrade.d.ts.map +1 -1
  36. package/dist/utils/upgradeFromThreeToThreeOne.d.ts.map +1 -1
  37. package/dist/utils/upgradeFromThreeToThreeOne.js +3 -7
  38. package/dist/utils/upgradeFromTwoToThree.d.ts.map +1 -1
  39. package/dist/utils/upgradeFromTwoToThree.js +14 -21
  40. package/dist/utils/validate.d.ts.map +1 -1
  41. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @scalar/openapi-parser
2
2
 
3
+ ## 0.10.10
4
+
5
+ ### Patch Changes
6
+
7
+ - 0d8a24f: chore: remove Swagger 2.0 upgrade warning
8
+
9
+ ## 0.10.9
10
+
11
+ ### Patch Changes
12
+
13
+ - c10bbf5: chore: code style
14
+
3
15
  ## 0.10.8
4
16
 
5
17
  ### Patch Changes
package/README.md CHANGED
@@ -91,15 +91,16 @@ const specification = `{
91
91
  "paths": {}
92
92
  }`
93
93
 
94
- const { specification } = filter(specification, (schema) => !schema?.['x-internal'])
94
+ const { specification } = filter(
95
+ specification,
96
+ (schema) => !schema?.['x-internal'],
97
+ )
95
98
  ```
96
99
 
97
100
  ### Upgrade your OpenAPI document
98
101
 
99
102
  There’s an `upgrade` command to upgrade all your OpenAPI documents to the latest OpenAPI version.
100
103
 
101
- > ⚠️ The upgrade from Swagger 2.0 is still experimental and probably lacks features.
102
-
103
104
  ```ts
104
105
  import { upgrade } from '@scalar/openapi-parser'
105
106
 
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/configuration/index.ts"],"names":[],"mappings":"AAIA;;GAEG;AACH,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;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
@@ -1 +1 @@
1
- {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAGL,KAAK,cAAc,EAEpB,MAAM,8BAA8B,CAAA;AACrC,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,sBAAsB,CAAA;AAK7B;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,SAAS;IACb,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IAErC,OAAc,iBAAiB,4BAAkB;IAGjD,SAAS,CAAC,aAAa,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG;QACxC,MAAM,EAAE,MAAM,CAAA;KACf,CACF,CAAK;IAEN,SAAS,CAAC,MAAM,EAAE,MAAM,CAAA;IAExB,SAAS,CAAC,oBAAoB,EAAE,MAAM,CAAA;IAEtC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAE5B,aAAa,EAAE,SAAS,CAAA;IAE/B;;OAEG;IACG,QAAQ,CACZ,UAAU,EAAE,UAAU,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,cAAc,CAAC;IAwF1B;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,cAAc;CA+B9C"}
1
+ {"version":3,"file":"Validator.d.ts","sourceRoot":"","sources":["../../../src/lib/Validator/Validator.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,cAAc,CAAA;AAEhC,OAAO,OAAO,MAAM,kBAAkB,CAAA;AAEtC,OAAO,EAAiC,KAAK,cAAc,EAAmB,MAAM,8BAA8B,CAAA;AAClH,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAA;AAKrG;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;CAG9B,CAAA;AAED,qBAAa,SAAS;IACb,OAAO,EAAE,KAAK,GAAG,KAAK,GAAG,KAAK,CAAA;IAErC,OAAc,iBAAiB,4BAAkB;IAGjD,SAAS,CAAC,aAAa,EAAE,MAAM,CAC7B,MAAM,EACN,CAAC,CAAC,aAAa,EAAE,SAAS,KAAK,OAAO,CAAC,GAAG;QACxC,MAAM,EAAE,MAAM,CAAA;KACf,CACF,CAAK;IAEN,SAAS,CAAC,MAAM,EAAE,MAAM,CAAA;IAExB,SAAS,CAAC,oBAAoB,EAAE,MAAM,CAAA;IAEtC,SAAS,CAAC,iBAAiB,EAAE,MAAM,CAAA;IAE5B,aAAa,EAAE,SAAS,CAAA;IAE/B;;OAEG;IACG,QAAQ,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,CAAC,EAAE,kBAAkB,GAAG,OAAO,CAAC,cAAc,CAAC;IAoF7F;;OAEG;IACG,eAAe,CAAC,OAAO,EAAE,cAAc;CA+B9C"}
@@ -1 +1 @@
1
- {"version":3,"file":"fetchUrls.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch-urls/fetchUrls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAO,MAAM,6BAA6B;;CAEzC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,mBAAmB,CAAC,EAAE;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAC3C,KAAK,UAkDL,CAAA"}
1
+ {"version":3,"file":"fetchUrls.d.ts","sourceRoot":"","sources":["../../../src/plugins/fetch-urls/fetchUrls.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAO,MAAM,6BAA6B;;CAEzC,CAAA;AAED,eAAO,MAAM,SAAS,EAAE,CAAC,mBAAmB,CAAC,EAAE;IAC7C;;OAEG;IACH,KAAK,CAAC,EAAE,MAAM,GAAG,KAAK,CAAA;IACtB;;OAEG;IACH,KAAK,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC,QAAQ,CAAC,CAAA;CAC3C,KAAK,UA2CL,CAAA"}
@@ -23,16 +23,13 @@ const fetchUrls = (customConfiguration) => {
23
23
  },
24
24
  async get(value) {
25
25
  // Limit ht enumber of requests
26
- if (configuration?.limit !== false &&
27
- numberOfRequests >= configuration?.limit) {
26
+ if (configuration?.limit !== false && numberOfRequests >= configuration?.limit) {
28
27
  console.warn(`[fetchUrls] Maximum number of requests reeached (${configuration?.limit}), skipping request`);
29
28
  return undefined;
30
29
  }
31
30
  try {
32
31
  numberOfRequests++;
33
- const response = await (configuration?.fetch
34
- ? configuration.fetch(value)
35
- : fetch(value));
32
+ const response = await (configuration?.fetch ? configuration.fetch(value) : fetch(value));
36
33
  return await response.text();
37
34
  }
38
35
  catch (error) {
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/index.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAGD,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,GAAG,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,GAAG,CAAA;IACX,YAAY,EAAE,GAAG,CAAA;IACjB,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAgB,eAAe,CAC7B,MAAM,EAAE,GAAG,EACX,IAAI,EAAE,GAAG,EACT,MAAM,EAAE,QAAQ,EAAE,EAClB,OAAO,GAAE,sBAA2B,OAcrC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/index.ts"],"names":[],"mappings":"AAEA,KAAK,sBAAsB,GAAG;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,IAAI,CAAC,EAAE,MAAM,CAAA;CACd,CAAA;AAGD,KAAK,QAAQ,GAAG;IACd,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,EAAE,GAAG,CAAA;IACX,OAAO,EAAE,MAAM,CAAA;IACf,MAAM,EAAE,GAAG,CAAA;IACX,YAAY,EAAE,GAAG,CAAA;IACjB,IAAI,EAAE,GAAG,CAAA;CACV,CAAA;AAED,wBAAgB,eAAe,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,EAAE,GAAG,EAAE,MAAM,EAAE,QAAQ,EAAE,EAAE,OAAO,GAAE,sBAA2B,OAa/G"}
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,qBAAyB,CAAA;AAIlD,eAAO,MAAM,eAAe,yBAAuB,CAAA;AACnD,eAAO,MAAM,YAAY,yBAAoB,CAAA;AAC7C,eAAO,MAAM,WAAW,yBAAmB,CAAA;AAC3C,eAAO,MAAM,SAAS,oBAA+B,CAAA;AAGrD,eAAO,MAAM,WAAW,0BAAqD,CAAA;AAE7E,eAAO,MAAM,WAAW,2CAEqB,CAAA;AAE7C,eAAO,MAAM,SAAS,+BAKsB,CAAA"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/utils/betterAjvErrors/utils.ts"],"names":[],"mappings":"AAMA,eAAO,MAAM,YAAY,qBAAyB,CAAA;AAIlD,eAAO,MAAM,eAAe,yBAAuB,CAAA;AACnD,eAAO,MAAM,YAAY,yBAAoB,CAAA;AAC7C,eAAO,MAAM,WAAW,yBAAmB,CAAA;AAC3C,eAAO,MAAM,SAAS,oBAA+B,CAAA;AAGrD,eAAO,MAAM,WAAW,0BAAqD,CAAA;AAE7E,eAAO,MAAM,WAAW,2CACmB,CAAA;AAE3C,eAAO,MAAM,SAAS,+BAIoB,CAAA"}
@@ -30,10 +30,7 @@ class EnumValidationError extends BaseValidationError {
30
30
  params: { allowedValues },
31
31
  } = this.options;
32
32
 
33
- const currentValue =
34
- this.instancePath === ''
35
- ? this.data
36
- : pointer.get(this.data, this.instancePath);
33
+ const currentValue = this.instancePath === '' ? this.data : pointer.get(this.data, this.instancePath);
37
34
 
38
35
  if (!currentValue) {
39
36
  return null
@@ -44,14 +41,9 @@ class EnumValidationError extends BaseValidationError {
44
41
  value,
45
42
  weight: leven(value, currentValue.toString()),
46
43
  }))
47
- .sort((x, y) =>
48
- x.weight > y.weight ? 1 : x.weight < y.weight ? -1 : 0,
49
- )[0];
50
-
51
- return allowedValues.length === 1 ||
52
- bestMatch.weight < bestMatch.value.length
53
- ? bestMatch.value
54
- : null
44
+ .sort((x, y) => (x.weight > y.weight ? 1 : x.weight < y.weight ? -1 : 0))[0];
45
+
46
+ return allowedValues.length === 1 || bestMatch.weight < bestMatch.value.length ? bestMatch.value : null
55
47
  }
56
48
  }
57
49
 
@@ -1 +1 @@
1
- {"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,iBAAiB,EACjB,UAAU,EACX,MAAM,mBAAmB,CAAA;AAI1B,OAAO,EACL,KAAK,wBAAwB,EAE9B,MAAM,wBAAwB,CAAA;AAE/B,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,sBAAsB,GAAG,UAAU,EAC1C,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
1
+ {"version":3,"file":"dereference.d.ts","sourceRoot":"","sources":["../../src/utils/dereference.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,iBAAiB,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAI9F,OAAO,EAAE,KAAK,wBAAwB,EAAqB,MAAM,wBAAwB,CAAA;AAEzF,MAAM,MAAM,kBAAkB,GAAG,wBAAwB,CAAA;AAEzD;;GAEG;AACH,wBAAsB,WAAW,CAC/B,KAAK,EAAE,sBAAsB,GAAG,UAAU,EAC1C,OAAO,CAAC,EAAE,kBAAkB,GAC3B,OAAO,CAAC,iBAAiB,CAAC,CAY5B"}
@@ -1 +1 @@
1
- {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,sBAAsB,EACtB,SAAS,EACT,YAAY,EACb,MAAM,mBAAmB,CAAA;AAK1B,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAA;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CACpB,aAAa,EAAE,sBAAsB,EACrC,QAAQ,EAAE,cAAc,GACvB,YAAY,CAWd"}
1
+ {"version":3,"file":"filter.d.ts","sourceRoot":"","sources":["../../src/utils/filter.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,sBAAsB,EAAE,SAAS,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAA;AAKxF,MAAM,MAAM,cAAc,GAAG,CAAC,MAAM,EAAE,SAAS,KAAK,OAAO,CAAA;AAE3D;;GAEG;AACH,wBAAgB,MAAM,CAAC,aAAa,EAAE,sBAAsB,EAAE,QAAQ,EAAE,cAAc,GAAG,YAAY,CAQpG"}
@@ -1 +1 @@
1
- {"version":3,"file":"getEntrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/getEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEpE;;GAEG;AACH,wBAAgB,aAAa,CAC3B,UAAU,CAAC,EAAE,UAAU,GACtB,eAAe,GAAG,SAAS,CAE7B"}
1
+ {"version":3,"file":"getEntrypoint.d.ts","sourceRoot":"","sources":["../../src/utils/getEntrypoint.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAA;AAEpE;;GAEG;AACH,wBAAgB,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,GAAG,eAAe,GAAG,SAAS,CAElF"}
@@ -1 +1 @@
1
- {"version":3,"file":"getListOfReferences.d.ts","sourceRoot":"","sources":["../../src/utils/getListOfReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,SAAS,YAuB3D"}
1
+ {"version":3,"file":"getListOfReferences.d.ts","sourceRoot":"","sources":["../../src/utils/getListOfReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAGlD;;;;GAIG;AACH,wBAAgB,mBAAmB,CAAC,aAAa,EAAE,SAAS,YAmB3D"}
@@ -13,9 +13,7 @@ function getListOfReferences(specification) {
13
13
  }
14
14
  // Traverse the specification and collect all references
15
15
  traverse(specification, (value) => {
16
- if (value.$ref &&
17
- typeof value.$ref === 'string' &&
18
- !value.$ref.startsWith('#')) {
16
+ if (value.$ref && typeof value.$ref === 'string' && !value.$ref.startsWith('#')) {
19
17
  references.push(value.$ref.split('#')[0]);
20
18
  }
21
19
  return value;
@@ -1 +1 @@
1
- {"version":3,"file":"isObject.d.ts","sourceRoot":"","sources":["../../src/utils/isObject.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,QAAQ,QAAS,GAAG,YAC+B,CAAA"}
1
+ {"version":3,"file":"isObject.d.ts","sourceRoot":"","sources":["../../src/utils/isObject.ts"],"names":[],"mappings":"AAAA;;GAEG;AACH,eAAO,MAAM,QAAQ,QAAS,GAAG,YAAmE,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/utils/load/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAGtB,UAAU,EACV,UAAU,EACV,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAM7B,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,CAAA;IAC/B,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB,GAAG,kBAAkB,CAAA;AAEtB;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CACxB,KAAK,EAAE,sBAAsB,EAC7B,OAAO,CAAC,EAAE,WAAW,GACpB,OAAO,CAAC,UAAU,CAAC,CAqIrB"}
1
+ {"version":3,"file":"load.d.ts","sourceRoot":"","sources":["../../../src/utils/load/load.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EACV,sBAAsB,EAGtB,UAAU,EACV,UAAU,EACV,kBAAkB,EACnB,MAAM,sBAAsB,CAAA;AAM7B,MAAM,MAAM,UAAU,GAAG;IACvB,KAAK,EAAE,CAAC,KAAK,CAAC,EAAE,GAAG,KAAK,OAAO,CAAA;IAC/B,GAAG,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAA;IACxB,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,MAAM,KAAK,MAAM,CAAA;IACvD,MAAM,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;IAC/B,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,GAAG,KAAK,MAAM,CAAA;CACrC,CAAA;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,OAAO,CAAC,EAAE,UAAU,EAAE,CAAA;IACtB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,UAAU,CAAA;CACxB,GAAG,kBAAkB,CAAA;AAEtB;;;;;;;;GAQG;AACH,wBAAsB,IAAI,CAAC,KAAK,EAAE,sBAAsB,EAAE,OAAO,CAAC,EAAE,WAAW,GAAG,OAAO,CAAC,UAAU,CAAC,CAyHpG"}
@@ -87,9 +87,7 @@ async function load(value, options) {
87
87
  if (!otherPlugin) {
88
88
  continue;
89
89
  }
90
- const target = otherPlugin.check(reference) && otherPlugin.resolvePath
91
- ? otherPlugin.resolvePath(value, reference)
92
- : reference;
90
+ const target = otherPlugin.check(reference) && otherPlugin.resolvePath ? otherPlugin.resolvePath(value, reference) : reference;
93
91
  // Don’t load a reference twice, check the filesystem before fetching something
94
92
  if (filesystem.find((entry) => entry.filename === reference)) {
95
93
  continue;
@@ -1 +1 @@
1
- {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/utils/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD;;;;GAIG;AACH,wBAAgB,SAAS,CACvB,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,GACjD,aAAa,GAAG,UAAU,CAwB5B"}
1
+ {"version":3,"file":"normalize.d.ts","sourceRoot":"","sources":["../../src/utils/normalize.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAGxD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,mBAAmB,CAAA;AAGnD;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,UAAU,GAAG,aAAa,GAAG,UAAU,CAwBxG"}
@@ -1 +1 @@
1
- {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAI5D;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAC5C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI5C"}
1
+ {"version":3,"file":"details.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/details.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAC1D,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,kBAAkB,CAAA;AAI5D;;GAEG;AACH,wBAAsB,OAAO,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC,CAI3G"}
@@ -1 +1 @@
1
- {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAGtE;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAC1C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,UAAU,CAAC,CAIrB"}
1
+ {"version":3,"file":"files.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/files.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAGtE;;GAEG;AACH,wBAAsB,KAAK,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,UAAU,CAAC,CAIlF"}
@@ -1 +1 @@
1
- {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAGxE;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EACxC,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAK1B"}
1
+ {"version":3,"file":"get.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/get.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAGxE;;GAEG;AACH,wBAAsB,GAAG,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAKrF"}
@@ -1 +1 @@
1
- {"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAK1D;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAC3C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI7B"}
1
+ {"version":3,"file":"toJson.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toJson.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAK1D;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,MAAM,GAAG,SAAS,CAAC,CAI3F"}
@@ -1 +1 @@
1
- {"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAK1D;;GAEG;AACH,wBAAsB,MAAM,CAAC,CAAC,SAAS,IAAI,EAAE,EAC3C,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,MAAM,CAAC,CAIjB"}
1
+ {"version":3,"file":"toYaml.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/actions/toYaml.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAK1D;;GAEG;AACH,wBAAs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;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;EAE9D"}
@@ -1 +1 @@
1
- {"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAS,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAO/E;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EACrD,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GACd,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CA4E1B"}
1
+ {"version":3,"file":"workThroughQueue.d.ts","sourceRoot":"","sources":["../../../../src/utils/openapi/utils/workThroughQueue.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAS,KAAK,EAAE,IAAI,EAAE,MAAM,yBAAyB,CAAA;AAO/E;;GAEG;AACH,wBAAsB,gBAAgB,CAAC,CAAC,SAAS,IAAI,EAAE,EAAE,KAAK,EAAE,KAAK,CAAC,CAAC,CAAC,GAAG,OAAO,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAmElG"}
@@ -1 +1 @@
1
- {"version":3,"file":"resolveReferences.d.ts","sourceRoot":"","sources":["../../src/utils/resolveReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,KAAK,EACV,SAAS,EACT,WAAW,EACX,UAAU,EACV,eAAe,EACf,kBAAkB,EACnB,MAAM,mBAAmB,CAAA;AAe1B,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAC1D;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACnE,CAAA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAE/B,KAAK,EAAE,SAAS,GAAG,UAAU,EAE7B,OAAO,CAAC,EAAE,wBAAwB,EAElC,IAAI,CAAC,EAAE,eAAe,EAEtB,MAAM,GAAE,WAAW,EAAO,GACzB,uBAAuB,CAqCzB"}
1
+ {"version":3,"file":"resolveReferences.d.ts","sourceRoot":"","sources":["../../src/utils/resolveReferences.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA;AAGpD,OAAO,KAAK,EAAE,SAAS,EAAE,WAAW,EAAE,UAAU,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,mBAAmB,CAAA;AAehH,MAAM,MAAM,uBAAuB,GAAG;IACpC,KAAK,EAAE,OAAO,CAAA;IACd,MAAM,EAAE,WAAW,EAAE,CAAA;IACrB,MAAM,EAAE,OAAO,CAAC,QAAQ,CAAA;CACzB,CAAA;AAED,MAAM,MAAM,wBAAwB,GAAG,kBAAkB,GAAG;IAC1D;;;;OAIG;IACH,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE;QAAE,MAAM,EAAE,SAAS,CAAC;QAAC,GAAG,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAA;CACnE,CAAA;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAE/B,KAAK,EAAE,SAAS,GAAG,UAAU,EAE7B,OAAO,CAAC,EAAE,wBAAwB,EAElC,IAAI,CAAC,EAAE,eAAe,EAEtB,MAAM,GAAE,WAAW,EAAO,GACzB,uBAAuB,CA0BzB"}
@@ -25,8 +25,7 @@ errors = []) {
25
25
  // Recursively resolve all references
26
26
  dereference(finalInput, filesystem, file ?? entrypoint, new WeakSet(), errors, options);
27
27
  // Remove duplicats (according to message) from errors
28
- errors = errors.filter((error, index, self) => index ===
29
- self.findIndex((t) => t.message === error.message && t.code === error.code));
28
+ errors = errors.filter((error, index, self) => index === self.findIndex((t) => t.message === error.message && t.code === error.code));
30
29
  // Return the resolved specification
31
30
  return {
32
31
  valid: errors.length === 0,
@@ -1 +1 @@
1
- {"version":3,"file":"addMissingTags.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/addMissingTags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,cAAc,eAAgB,SAAS,cA8CnD,CAAA"}
1
+ {"version":3,"file":"addMissingTags.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/addMissingTags.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,cAAc,eAAgB,SAAS,cAmCnD,CAAA"}
@@ -7,9 +7,7 @@ const addMissingTags = (definition) => {
7
7
  for (const path of Object.values(definition.paths)) {
8
8
  if (typeof path === 'object' && path !== null) {
9
9
  for (const operation of Object.values(path)) {
10
- if (typeof operation === 'object' &&
11
- operation !== null &&
12
- 'tags' in operation) {
10
+ if (typeof operation === 'object' && operation !== null && 'tags' in operation) {
13
11
  const tags = operation.tags;
14
12
  if (Array.isArray(tags)) {
15
13
  tags.forEach((tag) => usedTags.add(String(tag)));
@@ -20,18 +18,13 @@ const addMissingTags = (definition) => {
20
18
  }
21
19
  // Convert tags to array of tag objects if not already present
22
20
  const existingTags = new Set((Array.isArray(definition.tags) ? definition.tags : [])
23
- .map((tag) => typeof tag === 'object' && tag !== null ? String(tag.name) : null)
21
+ .map((tag) => (typeof tag === 'object' && tag !== null ? String(tag.name) : null))
24
22
  .filter(Boolean));
25
23
  // Add missing tags
26
- const missingTags = [...usedTags]
27
- .filter((tag) => !existingTags.has(tag))
28
- .map((name) => ({ name }));
24
+ const missingTags = [...usedTags].filter((tag) => !existingTags.has(tag)).map((name) => ({ name }));
29
25
  return {
30
26
  ...definition,
31
- tags: [
32
- ...(Array.isArray(definition.tags) ? definition.tags : []),
33
- ...missingTags,
34
- ],
27
+ tags: [...(Array.isArray(definition.tags) ? definition.tags : []), ...missingTags],
35
28
  };
36
29
  };
37
30
 
@@ -1 +1 @@
1
- {"version":3,"file":"normalizeSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/normalizeSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,wBAAwB,eAAgB,SAAS,cAsD7D,CAAA"}
1
+ {"version":3,"file":"normalizeSecuritySchemes.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/normalizeSecuritySchemes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,wBAAwB,eAAgB,SAAS,cAiD7D,CAAA"}
@@ -25,10 +25,7 @@ const normalizeSecuritySchemes = (definition) => {
25
25
  'flows' in scheme) {
26
26
  const flows = scheme.flows;
27
27
  for (const flow of Object.values(flows)) {
28
- if (typeof flow === 'object' &&
29
- flow !== null &&
30
- 'scopes' in flow &&
31
- Array.isArray(flow.scopes)) {
28
+ if (typeof flow === 'object' && flow !== null && 'scopes' in flow && Array.isArray(flow.scopes)) {
32
29
  flow.scopes = flow.scopes.reduce((acc, scope) => {
33
30
  acc[scope] = '';
34
31
  return acc;
@@ -1 +1 @@
1
- {"version":3,"file":"rejectSwaggerDocuments.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/rejectSwaggerDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,sBAAsB,cAAe,SAAS,cAQ1D,CAAA"}
1
+ {"version":3,"file":"rejectSwaggerDocuments.d.ts","sourceRoot":"","sources":["../../../../src/utils/transform/utils/rejectSwaggerDocuments.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAA;AAExD,eAAO,MAAM,sBAAsB,cAAe,SAAS,cAM1D,CAAA"}
@@ -1 +1 @@
1
- {"version":3,"file":"traverse.d.ts","sourceRoot":"","sources":["../../src/utils/traverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD;;GAEG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,SAAS,EACxB,SAAS,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,SAAS,EACnE,IAAI,GAAE,MAAM,EAAO,aA0BpB"}
1
+ {"version":3,"file":"traverse.d.ts","sourceRoot":"","sources":["../../src/utils/traverse.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAA;AAElD;;GAEG;AACH,wBAAgB,QAAQ,CACtB,aAAa,EAAE,SAAS,EACxB,SAAS,EAAE,CAAC,aAAa,EAAE,SAAS,EAAE,IAAI,CAAC,EAAE,MAAM,EAAE,KAAK,SAAS,EACnE,IAAI,GAAE,MAAM,EAAO,aAsBpB"}
@@ -13,9 +13,7 @@ function traverse(specification, transform, path = []) {
13
13
  return item;
14
14
  });
15
15
  }
16
- else if (typeof value === 'object' &&
17
- !Array.isArray(value) &&
18
- value !== null) {
16
+ else if (typeof value === 'object' && !Array.isArray(value) && value !== null) {
19
17
  result[key] = traverse(value, transform, currentPath);
20
18
  }
21
19
  else {
@@ -1 +1 @@
1
- {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/utils/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAM7E;;GAEG;AACH,wBAAgB,OAAO,CACrB,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GACrC,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAoBrC"}
1
+ {"version":3,"file":"upgrade.d.ts","sourceRoot":"","sources":["../../src/utils/upgrade.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AAExD,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAA;AAM7E;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,GAAG,aAAa,CAAC,WAAW,CAAC,QAAQ,CAAC,CAoBnG"}
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeFromThreeToThreeOne.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromThreeToThreeOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD;;;;GAIG;AACH,wBAAgB,0BAA0B,CACxC,qBAAqB,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;mBAmIrC;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAsBpD"}
1
+ {"version":3,"file":"upgradeFromThreeToThreeOne.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromThreeToThreeOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA;AACxD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,qBAAqB,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;mBAwH9E;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAsBpD"}
@@ -8,9 +8,7 @@ import { traverse } from './traverse.js';
8
8
  function upgradeFromThreeToThreeOne(originalSpecification) {
9
9
  let specification = originalSpecification;
10
10
  // Version
11
- if (specification !== null &&
12
- typeof specification.openapi === 'string' &&
13
- specification.openapi.startsWith('3.0')) {
11
+ if (specification !== null && typeof specification.openapi === 'string' && specification.openapi.startsWith('3.0')) {
14
12
  specification.openapi = '3.1.1';
15
13
  }
16
14
  else {
@@ -68,15 +66,13 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
68
66
  // Check if this is a multipart request body schema
69
67
  const parentPath = path.slice(0, -1);
70
68
  const isMultipart = parentPath.some((segment, index) => {
71
- return (segment === 'content' && path[index + 1] === 'multipart/form-data');
69
+ return segment === 'content' && path[index + 1] === 'multipart/form-data';
72
70
  });
73
71
  if (isMultipart) {
74
72
  // Types
75
73
  const entries = Object.entries(schema.properties);
76
74
  for (const [_, value] of entries) {
77
- if (typeof value === 'object' &&
78
- value.type === 'string' &&
79
- value.format === 'binary') {
75
+ if (typeof value === 'object' && value.type === 'string' && value.format === 'binary') {
80
76
  value.contentMediaType = 'application/octet-stream';
81
77
  delete value.format;
82
78
  }
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeFromTwoToThree.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromTwoToThree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,qBAAqB,EAAE,aAAa,0CAkQzE"}
1
+ {"version":3,"file":"upgradeFromTwoToThree.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromTwoToThree.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAa,SAAS,EAAE,MAAM,uBAAuB,CAAA;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,qBAAqB,CAAA;AAIxD;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,qBAAqB,EAAE,aAAa,0CAgOzE"}
@@ -8,9 +8,7 @@ import { traverse } from './traverse.js';
8
8
  function upgradeFromTwoToThree(originalSpecification) {
9
9
  let specification = originalSpecification;
10
10
  // Version
11
- if (specification !== null &&
12
- typeof specification.swagger === 'string' &&
13
- specification.swagger?.startsWith('2.0')) {
11
+ if (specification !== null && typeof specification.swagger === 'string' && specification.swagger?.startsWith('2.0')) {
14
12
  specification.openapi = '3.0.4';
15
13
  delete specification.swagger;
16
14
  }
@@ -18,12 +16,9 @@ function upgradeFromTwoToThree(originalSpecification) {
18
16
  // Skip if it’s something else than 3.0.x
19
17
  return specification;
20
18
  }
21
- console.warn(`[upgradeFromTwoToThree] The upgrade from Swagger 2.0 to OpenAPI 3.0 documents is experimental and lacks features.`);
22
19
  // Servers
23
20
  if (specification.host) {
24
- const schemes = Array.isArray(specification.schemes) && specification.schemes?.length
25
- ? specification.schemes
26
- : ['http'];
21
+ const schemes = Array.isArray(specification.schemes) && specification.schemes?.length ? specification.schemes : ['http'];
27
22
  specification.servers = schemes.map((scheme) => ({
28
23
  url: `${scheme}://${specification.host}${specification.basePath ?? ''}`,
29
24
  }));
@@ -59,8 +54,7 @@ function upgradeFromTwoToThree(originalSpecification) {
59
54
  if (bodyParameter && Object.keys(bodyParameter).length) {
60
55
  delete bodyParameter.name;
61
56
  delete bodyParameter.in;
62
- const consumes = specification.consumes ??
63
- operationItem.consumes ?? ['application/json'];
57
+ const consumes = specification.consumes ?? operationItem.consumes ?? ['application/json'];
64
58
  if (typeof operationItem.requestBody !== 'object') {
65
59
  operationItem.requestBody = {};
66
60
  }
@@ -98,10 +92,11 @@ function upgradeFromTwoToThree(originalSpecification) {
98
92
  },
99
93
  };
100
94
  for (const param of formDataParameters) {
101
- operationItem.requestBody.content['application/x-www-form-urlencoded'].schema.properties[param.name] = {
102
- type: param.type,
103
- description: param.description,
104
- };
95
+ operationItem.requestBody.content['application/x-www-form-urlencoded'].schema.properties[param.name] =
96
+ {
97
+ type: param.type,
98
+ description: param.description,
99
+ };
105
100
  // Add to required array if param is required
106
101
  if (param.required) {
107
102
  operationItem.requestBody.content['application/x-www-form-urlencoded'].schema.required.push(param.name);
@@ -117,8 +112,7 @@ function upgradeFromTwoToThree(originalSpecification) {
117
112
  if (Object.hasOwn(operationItem.responses, response)) {
118
113
  const responseItem = operationItem.responses[response];
119
114
  if (responseItem.schema) {
120
- const produces = specification.produces ??
121
- operationItem.produces ?? ['application/json'];
115
+ const produces = specification.produces ?? operationItem.produces ?? ['application/json'];
122
116
  if (typeof responseItem.content !== 'object') {
123
117
  responseItem.content = {};
124
118
  }
@@ -148,16 +142,14 @@ function upgradeFromTwoToThree(originalSpecification) {
148
142
  specification.components = {};
149
143
  }
150
144
  // Assert that components is of type OpenAPIV3.ComponentsObject
151
- specification.components =
152
- specification.components;
145
+ specification.components = specification.components;
153
146
  Object.assign(specification.components, { securitySchemes: {} });
154
147
  for (const [key, securityScheme] of Object.entries(specification.securityDefinitions)) {
155
148
  if (typeof securityScheme === 'object') {
156
149
  if ('type' in securityScheme && securityScheme.type === 'oauth2') {
157
150
  const { flow, authorizationUrl, tokenUrl, scopes } = securityScheme;
158
151
  // Assert that securitySchemes is of type OpenAPIV3.SecuritySchemeObject
159
- Object.assign(specification.components
160
- .securitySchemes, {
152
+ Object.assign(specification.components.securitySchemes, {
161
153
  [key]: {
162
154
  type: 'oauth2',
163
155
  flows: {
@@ -167,8 +159,9 @@ function upgradeFromTwoToThree(originalSpecification) {
167
159
  });
168
160
  }
169
161
  else {
170
- Object.assign(specification.components
171
- .securitySchemes, { [key]: securityScheme });
162
+ Object.assign(specification.components.securitySchemes, {
163
+ [key]: securityScheme,
164
+ });
172
165
  }
173
166
  }
174
167
  }
@@ -1 +1 @@
1
- {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EACV,SAAS,EACT,UAAU,EACV,kBAAkB,EAClB,cAAc,EACf,MAAM,mBAAmB,CAAA;AAG1B,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEhD;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,EACtC,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CAWzB"}
1
+ {"version":3,"file":"validate.d.ts","sourceRoot":"","sources":["../../src/utils/validate.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,SAAS,EAAE,UAAU,EAAE,kBAAkB,EAAE,cAAc,EAAE,MAAM,mBAAmB,CAAA;AAGlG,MAAM,MAAM,eAAe,GAAG,kBAAkB,CAAA;AAEhD;;GAEG;AACH,wBAAsB,QAAQ,CAC5B,KAAK,EAAE,MAAM,GAAG,SAAS,GAAG,UAAU,EACtC,OAAO,CAAC,EAAE,eAAe,GACxB,OAAO,CAAC,cAAc,CAAC,CAWzB"}
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "parser",
18
18
  "typescript"
19
19
  ],
20
- "version": "0.10.8",
20
+ "version": "0.10.10",
21
21
  "engines": {
22
22
  "node": ">=18"
23
23
  },
@@ -64,9 +64,9 @@
64
64
  "json-to-ast": "^2.1.0",
65
65
  "just-diff": "^6.0.2",
66
66
  "tinybench": "^2.8.0",
67
- "@scalar/openapi-types": "0.1.8",
68
- "@scalar/build-tooling": "0.1.14",
69
- "@scalar/types": "0.0.34"
67
+ "@scalar/build-tooling": "0.1.17",
68
+ "@scalar/openapi-types": "0.1.9",
69
+ "@scalar/types": "0.0.40"
70
70
  },
71
71
  "scripts": {
72
72
  "build": "scalar-build-rollup",