@scalar/openapi-parser 0.10.5 → 0.10.7
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 +13 -0
- package/dist/plugins/fetch-urls/fetchUrls.d.ts.map +1 -1
- package/dist/plugins/fetch-urls/fetchUrls.js +1 -0
- package/dist/plugins/read-files/readFiles.d.ts.map +1 -1
- package/dist/plugins/read-files/readFiles.js +1 -0
- package/dist/utils/resolveReferences.js +3 -2
- package/dist/utils/upgradeFromThreeToThreeOne.js +1 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,18 @@
|
|
|
1
1
|
# @scalar/openapi-parser
|
|
2
2
|
|
|
3
|
+
## 0.10.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 1223c1f: chore: code style
|
|
8
|
+
|
|
9
|
+
## 0.10.6
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 4de3124: feat: make 'null' the second type in an array when upgrading
|
|
14
|
+
- 34e6f52: feat: upgrade to stricter tsconfig
|
|
15
|
+
|
|
3
16
|
## 0.10.5
|
|
4
17
|
|
|
5
18
|
### Patch Changes
|
|
@@ -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,
|
|
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 +1 @@
|
|
|
1
|
-
{"version":3,"file":"readFiles.d.ts","sourceRoot":"","sources":["../../../src/plugins/read-files/readFiles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"readFiles.d.ts","sourceRoot":"","sources":["../../../src/plugins/read-files/readFiles.ts"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,0BAA0B,CAAA;AAE1D,eAAO,MAAM,SAAS,EAAE,MAAM,UAqD7B,CAAA"}
|
|
@@ -97,7 +97,7 @@ resolve, errors) {
|
|
|
97
97
|
code: 'INVALID_REFERENCE',
|
|
98
98
|
message: ERRORS.INVALID_REFERENCE.replace('%s', uri),
|
|
99
99
|
});
|
|
100
|
-
return;
|
|
100
|
+
return undefined;
|
|
101
101
|
}
|
|
102
102
|
// Understand the URI
|
|
103
103
|
const [prefix, path] = uri.split('#', 2);
|
|
@@ -116,7 +116,7 @@ resolve, errors) {
|
|
|
116
116
|
code: 'EXTERNAL_REFERENCE_NOT_FOUND',
|
|
117
117
|
message: ERRORS.EXTERNAL_REFERENCE_NOT_FOUND.replace('%s', prefix),
|
|
118
118
|
});
|
|
119
|
-
return;
|
|
119
|
+
return undefined;
|
|
120
120
|
}
|
|
121
121
|
// $ref: 'other-file.yaml'
|
|
122
122
|
if (path === undefined) {
|
|
@@ -143,6 +143,7 @@ resolve, errors) {
|
|
|
143
143
|
message: ERRORS.INVALID_REFERENCE.replace('%s', uri),
|
|
144
144
|
});
|
|
145
145
|
}
|
|
146
|
+
return undefined;
|
|
146
147
|
}
|
|
147
148
|
|
|
148
149
|
export { resolveReferences };
|
|
@@ -20,7 +20,7 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
|
|
|
20
20
|
// Nullable types
|
|
21
21
|
specification = traverse(specification, (schema) => {
|
|
22
22
|
if (schema.type !== 'undefined' && schema.nullable === true) {
|
|
23
|
-
schema.type = ['null'
|
|
23
|
+
schema.type = [schema.type, 'null'];
|
|
24
24
|
delete schema.nullable;
|
|
25
25
|
}
|
|
26
26
|
return schema;
|
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"parser",
|
|
18
18
|
"typescript"
|
|
19
19
|
],
|
|
20
|
-
"version": "0.10.
|
|
20
|
+
"version": "0.10.7",
|
|
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/build-tooling": "0.1.
|
|
68
|
-
"@scalar/
|
|
69
|
-
"@scalar/types": "0.
|
|
67
|
+
"@scalar/build-tooling": "0.1.13",
|
|
68
|
+
"@scalar/types": "0.0.33",
|
|
69
|
+
"@scalar/openapi-types": "0.1.7"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "scalar-build-rollup",
|