@swagger-api/apidom-ns-openapi-3-1 0.82.1 → 0.83.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.
- package/CHANGELOG.md +10 -0
- package/cjs/refractor/plugins/normalize-servers.cjs +3 -1
- package/cjs/refractor/plugins/replace-empty-element.cjs +2 -2
- package/dist/apidom-ns-openapi-3-1.browser.js +10 -6
- package/dist/apidom-ns-openapi-3-1.browser.min.js +1 -1
- package/es/refractor/plugins/normalize-servers.mjs +3 -1
- package/es/refractor/plugins/replace-empty-element.mjs +2 -2
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,16 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [0.83.0](https://github.com/swagger-api/apidom/compare/v0.82.2...v0.83.0) (2023-11-07)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @swagger-api/apidom-ns-openapi-3-1
|
|
9
|
+
|
|
10
|
+
## [0.82.2](https://github.com/swagger-api/apidom/compare/v0.82.1...v0.82.2) (2023-11-03)
|
|
11
|
+
|
|
12
|
+
### Bug Fixes
|
|
13
|
+
|
|
14
|
+
- return support for Node.js >=12.20.0 ([#3356](https://github.com/swagger-api/apidom/issues/3356)) ([75528ec](https://github.com/swagger-api/apidom/commit/75528eca3cc54bfae2240d8482d0858f0f7dbef9))
|
|
15
|
+
|
|
6
16
|
## [0.82.1](https://github.com/swagger-api/apidom/compare/v0.82.0...v0.82.1) (2023-11-03)
|
|
7
17
|
|
|
8
18
|
### Bug Fixes
|
|
@@ -63,7 +63,9 @@ const plugin = () => ({
|
|
|
63
63
|
// skip visiting this Operation
|
|
64
64
|
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
65
65
|
if (!ancestors.some(predicates.isOpenApi3_1Element)) return;
|
|
66
|
-
|
|
66
|
+
|
|
67
|
+
// @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.findLast in future
|
|
68
|
+
const parentPathItemElement = [...ancestors].reverse().find(predicates.isPathItemElement);
|
|
67
69
|
const isServersUndefined = typeof operationElement.servers === 'undefined';
|
|
68
70
|
const isServersArrayElement = predicates.isArrayElement(operationElement.servers);
|
|
69
71
|
const isServersEmpty = isServersArrayElement && operationElement.servers.length === 0;
|
|
@@ -639,7 +639,7 @@ const plugin = () => ({
|
|
|
639
639
|
// no empty Element, continue with next one
|
|
640
640
|
if (!isEmptyElement(element.value)) return undefined;
|
|
641
641
|
const [,,, ancestors] = rest;
|
|
642
|
-
const ancestor = ancestors.
|
|
642
|
+
const ancestor = ancestors[ancestors.length - 1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
643
643
|
const elementFactory = findElementFactory(ancestor, (0, _apidomCore.toValue)(element.key));
|
|
644
644
|
|
|
645
645
|
// no element factory found
|
|
@@ -652,7 +652,7 @@ const plugin = () => ({
|
|
|
652
652
|
StringElement(element, ...rest) {
|
|
653
653
|
if (!isEmptyElement(element)) return undefined;
|
|
654
654
|
const [,,, ancestors] = rest;
|
|
655
|
-
const ancestor = ancestors.
|
|
655
|
+
const ancestor = ancestors[ancestors.length - 1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
656
656
|
|
|
657
657
|
// we're only interested in empty elements in ArrayElements
|
|
658
658
|
if (!predicates.isArrayElement(ancestor)) return undefined;
|
|
@@ -2186,7 +2186,9 @@ const plugin = () => ({
|
|
|
2186
2186
|
// skip visiting this Operation
|
|
2187
2187
|
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
2188
2188
|
if (!ancestors.some(predicates.isOpenApi3_1Element)) return;
|
|
2189
|
-
|
|
2189
|
+
|
|
2190
|
+
// @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.findLast in future
|
|
2191
|
+
const parentPathItemElement = [...ancestors].reverse().find(predicates.isPathItemElement);
|
|
2190
2192
|
const isServersUndefined = typeof operationElement.servers === 'undefined';
|
|
2191
2193
|
const isServersArrayElement = predicates.isArrayElement(operationElement.servers);
|
|
2192
2194
|
const isServersEmpty = isServersArrayElement && operationElement.servers.length === 0;
|
|
@@ -2923,7 +2925,7 @@ const plugin = () => ({
|
|
|
2923
2925
|
// no empty Element, continue with next one
|
|
2924
2926
|
if (!isEmptyElement(element.value)) return undefined;
|
|
2925
2927
|
const [,,, ancestors] = rest;
|
|
2926
|
-
const ancestor = ancestors.
|
|
2928
|
+
const ancestor = ancestors[ancestors.length - 1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
2927
2929
|
const elementFactory = findElementFactory(ancestor, (0,_swagger_api_apidom_core__WEBPACK_IMPORTED_MODULE_65__["default"])(element.key));
|
|
2928
2930
|
|
|
2929
2931
|
// no element factory found
|
|
@@ -2936,7 +2938,7 @@ const plugin = () => ({
|
|
|
2936
2938
|
StringElement(element, ...rest) {
|
|
2937
2939
|
if (!isEmptyElement(element)) return undefined;
|
|
2938
2940
|
const [,,, ancestors] = rest;
|
|
2939
|
-
const ancestor = ancestors.
|
|
2941
|
+
const ancestor = ancestors[ancestors.length - 1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
2940
2942
|
|
|
2941
2943
|
// we're only interested in empty elements in ArrayElements
|
|
2942
2944
|
if (!predicates.isArrayElement(ancestor)) return undefined;
|
|
@@ -19147,8 +19149,9 @@ visitor, {
|
|
|
19147
19149
|
}
|
|
19148
19150
|
} while (stack !== undefined);
|
|
19149
19151
|
if (edits.length !== 0) {
|
|
19150
|
-
return edits.
|
|
19152
|
+
return edits[edits.length - 1][1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
19151
19153
|
}
|
|
19154
|
+
|
|
19152
19155
|
return root;
|
|
19153
19156
|
};
|
|
19154
19157
|
|
|
@@ -19299,8 +19302,9 @@ visitor, {
|
|
|
19299
19302
|
}
|
|
19300
19303
|
} while (stack !== undefined);
|
|
19301
19304
|
if (edits.length !== 0) {
|
|
19302
|
-
return edits.
|
|
19305
|
+
return edits[edits.length - 1][1]; // @TODO(vladimir.gorej@gmail.com): can be replaced by Array.prototype.at in future
|
|
19303
19306
|
}
|
|
19307
|
+
|
|
19304
19308
|
return root;
|
|
19305
19309
|
};
|
|
19306
19310
|
|
|
@@ -19322,7 +19326,7 @@ class CloneError extends _swagger_api_apidom_error__WEBPACK_IMPORTED_MODULE_0__[
|
|
|
19322
19326
|
constructor(message, structuredOptions) {
|
|
19323
19327
|
super(message, structuredOptions);
|
|
19324
19328
|
if (typeof structuredOptions !== 'undefined') {
|
|
19325
|
-
this.value = structuredOptions.
|
|
19329
|
+
this.value = structuredOptions.value;
|
|
19326
19330
|
}
|
|
19327
19331
|
}
|
|
19328
19332
|
}
|