@scalar/openapi-parser 0.10.12 → 0.10.13
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 +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,CAAC,qBAAqB,EAAE,aAAa;;;;;;;;;;;;;;;;;;;;
|
|
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;;;;;;;;;;;;;;;;;;;;mBAuI9E;AAED,uDAAuD;AACvD,wBAAgB,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,GAAG,OAAO,CAsBpD"}
|
|
@@ -104,6 +104,18 @@ function upgradeFromThreeToThreeOne(originalSpecification) {
|
|
|
104
104
|
}
|
|
105
105
|
return schema;
|
|
106
106
|
});
|
|
107
|
+
specification = traverse(specification, (schema, path) => {
|
|
108
|
+
if (schema.type === 'string' && schema.format === 'byte') {
|
|
109
|
+
const parentPath = path.slice(0, -1);
|
|
110
|
+
const contentMediaType = parentPath.find((_, index) => path[index - 1] === 'content');
|
|
111
|
+
return {
|
|
112
|
+
type: 'string',
|
|
113
|
+
contentEncoding: 'base64',
|
|
114
|
+
contentMediaType,
|
|
115
|
+
};
|
|
116
|
+
}
|
|
117
|
+
return schema;
|
|
118
|
+
});
|
|
107
119
|
// Declaring $schema Dialects to protect against change
|
|
108
120
|
// if (typeof specification.$schema === 'undefined') {
|
|
109
121
|
// specification.$schema = 'http://json-schema.org/draft-07/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.13",
|
|
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/types": "0.1.2",
|
|
68
67
|
"@scalar/build-tooling": "0.1.17",
|
|
69
|
-
"@scalar/
|
|
68
|
+
"@scalar/types": "0.1.5",
|
|
69
|
+
"@scalar/openapi-types": "0.2.0"
|
|
70
70
|
},
|
|
71
71
|
"scripts": {
|
|
72
72
|
"build": "scalar-build-rollup",
|