@scalar/openapi-parser 0.8.8 → 0.8.9

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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # @scalar/openapi-parser
2
2
 
3
+ ## 0.8.9
4
+
5
+ ### Patch Changes
6
+
7
+ - 757fade: fix: when migrating example to example objects, the example should be inside the value attribute
8
+ - a607115: feat: add openapi 3.0.4 and openapi 3.1.1
9
+
3
10
  ## 0.8.8
4
11
 
5
12
  ### Patch Changes
@@ -1 +1 @@
1
- {"version":3,"file":"upgradeFromThreeToThreeOne.d.ts","sourceRoot":"","sources":["../../src/utils/upgradeFromThreeToThreeOne.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,qBAAqB,EAAE,SAAS,aA2G1E;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,SAAS,EAAE,MAAM,UAAU,CAAA;AAGzC;;;;GAIG;AACH,wBAAgB,0BAA0B,CAAC,qBAAqB,EAAE,SAAS,aA6G1E;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAsBpD"}
@@ -9,7 +9,7 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
9
9
  let specification = originalSpecification;
10
10
  // Version
11
11
  if (specification.openapi?.startsWith('3.0')) {
12
- specification.openapi = '3.1.0';
12
+ specification.openapi = '3.1.1';
13
13
  }
14
14
  else {
15
15
  // Skip if it’s something else than 3.0.x
@@ -51,7 +51,9 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
51
51
  // Objects everywhere else
52
52
  else {
53
53
  schema.examples = {
54
- default: schema.example,
54
+ default: {
55
+ value: schema.example,
56
+ },
55
57
  };
56
58
  }
57
59
  delete schema.example;
@@ -8,7 +8,7 @@ import { traverse } from './traverse.js';
8
8
  function upgradeFromTwoToThree(specification) {
9
9
  // Version
10
10
  if (specification.swagger?.startsWith('2.0')) {
11
- specification.openapi = '3.0.3';
11
+ specification.openapi = '3.0.4';
12
12
  delete specification.swagger;
13
13
  }
14
14
  else {
package/package.json CHANGED
@@ -17,7 +17,7 @@
17
17
  "parser",
18
18
  "typescript"
19
19
  ],
20
- "version": "0.8.8",
20
+ "version": "0.8.9",
21
21
  "engines": {
22
22
  "node": ">=18"
23
23
  },
@@ -65,7 +65,7 @@
65
65
  "just-diff": "^6.0.2",
66
66
  "tinybench": "^2.8.0",
67
67
  "@scalar/build-tooling": "0.1.11",
68
- "@scalar/openapi-types": "0.1.4"
68
+ "@scalar/openapi-types": "0.1.5"
69
69
  },
70
70
  "scripts": {
71
71
  "build": "scalar-build-rollup",