@speclynx/apidom-parser-adapter-openapi-json-3-1 4.0.4 → 4.1.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
CHANGED
|
@@ -3,6 +3,14 @@
|
|
|
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
|
+
# [4.1.0](https://github.com/speclynx/apidom/compare/v4.0.5...v4.1.0) (2026-03-16)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-3-1
|
|
9
|
+
|
|
10
|
+
## [4.0.5](https://github.com/speclynx/apidom/compare/v4.0.4...v4.0.5) (2026-03-13)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-json-3-1
|
|
13
|
+
|
|
6
14
|
## [4.0.4](https://github.com/speclynx/apidom/compare/v4.0.3...v4.0.4) (2026-03-12)
|
|
7
15
|
|
|
8
16
|
### Bug Fixes
|
|
@@ -37722,18 +37722,13 @@ const specification = {
|
|
|
37722
37722
|
"use strict";
|
|
37723
37723
|
__webpack_require__.r(__webpack_exports__);
|
|
37724
37724
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
37725
|
-
/* harmony export */ ancestorLineageToJSONPointer: () => (/* binding */ ancestorLineageToJSONPointer),
|
|
37726
37725
|
/* harmony export */ "default": () => (__WEBPACK_DEFAULT_EXPORT__)
|
|
37727
37726
|
/* harmony export */ });
|
|
37728
37727
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(55156);
|
|
37729
37728
|
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(25162);
|
|
37730
|
-
/* harmony import */ var
|
|
37731
|
-
/* harmony import */ var
|
|
37732
|
-
/* harmony import */ var
|
|
37733
|
-
/* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_5__ = __webpack_require__(68201);
|
|
37734
|
-
/* harmony import */ var _namespace_mjs__WEBPACK_IMPORTED_MODULE_6__ = __webpack_require__(57195);
|
|
37735
|
-
|
|
37736
|
-
|
|
37729
|
+
/* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(76332);
|
|
37730
|
+
/* harmony import */ var _predicates_mjs__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(68201);
|
|
37731
|
+
/* harmony import */ var _namespace_mjs__WEBPACK_IMPORTED_MODULE_4__ = __webpack_require__(57195);
|
|
37737
37732
|
|
|
37738
37733
|
|
|
37739
37734
|
|
|
@@ -37741,46 +37736,21 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
37741
37736
|
/**
|
|
37742
37737
|
* @public
|
|
37743
37738
|
*/
|
|
37744
|
-
/**
|
|
37745
|
-
* Translates visitor ancestor lineage to a JSON Pointer tokens.
|
|
37746
|
-
* Ancestor lineage is constructed of following visitor method arguments:
|
|
37747
|
-
*
|
|
37748
|
-
* - ancestors
|
|
37749
|
-
* - parent
|
|
37750
|
-
* - element
|
|
37751
|
-
* @public
|
|
37752
|
-
*/
|
|
37753
|
-
const ancestorLineageToJSONPointer = elementPath => {
|
|
37754
|
-
const jsonPointerTokens = elementPath.reduce((path, element, index) => {
|
|
37755
|
-
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isMemberElement)(element)) {
|
|
37756
|
-
const token = String((0,_speclynx_apidom_core__WEBPACK_IMPORTED_MODULE_2__["default"])(element.key));
|
|
37757
|
-
path.push(token);
|
|
37758
|
-
} else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isArrayElement)(elementPath[index - 2])) {
|
|
37759
|
-
const arrayElement = elementPath[index - 2];
|
|
37760
|
-
const token = String(arrayElement.content?.indexOf(element) ?? -1);
|
|
37761
|
-
path.push(token);
|
|
37762
|
-
}
|
|
37763
|
-
return path;
|
|
37764
|
-
}, []);
|
|
37765
|
-
return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_3__.compile)(jsonPointerTokens);
|
|
37766
|
-
};
|
|
37767
|
-
|
|
37768
37739
|
/**
|
|
37769
37740
|
* @public
|
|
37770
37741
|
*/
|
|
37771
37742
|
const createToolbox = () => {
|
|
37772
37743
|
const namespace = new _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__["default"]();
|
|
37773
37744
|
const predicates = {
|
|
37774
|
-
...
|
|
37775
|
-
...
|
|
37745
|
+
..._predicates_mjs__WEBPACK_IMPORTED_MODULE_3__,
|
|
37746
|
+
..._predicates_mjs__WEBPACK_IMPORTED_MODULE_2__,
|
|
37776
37747
|
isStringElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isStringElement,
|
|
37777
37748
|
isArrayElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isArrayElement,
|
|
37778
37749
|
isObjectElement: _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_1__.isObjectElement
|
|
37779
37750
|
};
|
|
37780
|
-
namespace.use(
|
|
37751
|
+
namespace.use(_namespace_mjs__WEBPACK_IMPORTED_MODULE_4__["default"]);
|
|
37781
37752
|
return {
|
|
37782
37753
|
predicates,
|
|
37783
|
-
ancestorLineageToJSONPointer,
|
|
37784
37754
|
namespace
|
|
37785
37755
|
};
|
|
37786
37756
|
};
|
|
@@ -41003,9 +40973,9 @@ const mergeVisitors = (visitors, options = {}) => {
|
|
|
41003
40973
|
}
|
|
41004
40974
|
|
|
41005
40975
|
// Handle path-based control flow
|
|
40976
|
+
// Note: no break here — other merged visitors must still process this node
|
|
41006
40977
|
if (proxyPath.shouldStop) {
|
|
41007
40978
|
skipping[i] = breakSymbol;
|
|
41008
|
-
break;
|
|
41009
40979
|
}
|
|
41010
40980
|
if (proxyPath.shouldSkip) {
|
|
41011
40981
|
skipping[i] = currentNode;
|
|
@@ -41036,6 +41006,11 @@ const mergeVisitors = (visitors, options = {}) => {
|
|
|
41036
41006
|
}
|
|
41037
41007
|
}
|
|
41038
41008
|
}
|
|
41009
|
+
|
|
41010
|
+
// stop traversal only when all visitors have stopped
|
|
41011
|
+
if (skipping.every(s => s === breakSymbol)) {
|
|
41012
|
+
path.stop();
|
|
41013
|
+
}
|
|
41039
41014
|
if (hasChanged) {
|
|
41040
41015
|
path.replaceWith(currentNode);
|
|
41041
41016
|
return currentNode;
|
|
@@ -41061,9 +41036,9 @@ const mergeVisitors = (visitors, options = {}) => {
|
|
|
41061
41036
|
}
|
|
41062
41037
|
|
|
41063
41038
|
// Handle path-based control flow
|
|
41039
|
+
// Note: no break here — other merged visitors must still process this node
|
|
41064
41040
|
if (proxyPath.shouldStop) {
|
|
41065
41041
|
skipping[i] = breakSymbol;
|
|
41066
|
-
break;
|
|
41067
41042
|
}
|
|
41068
41043
|
if (proxyPath.removed) {
|
|
41069
41044
|
path.remove();
|
|
@@ -41083,6 +41058,11 @@ const mergeVisitors = (visitors, options = {}) => {
|
|
|
41083
41058
|
skipping[i] = internalSkipSymbol;
|
|
41084
41059
|
}
|
|
41085
41060
|
}
|
|
41061
|
+
|
|
41062
|
+
// stop traversal only when all visitors have stopped
|
|
41063
|
+
if (skipping.every(s => s === breakSymbol)) {
|
|
41064
|
+
path.stop();
|
|
41065
|
+
}
|
|
41086
41066
|
return undefined;
|
|
41087
41067
|
}
|
|
41088
41068
|
};
|
|
@@ -41111,9 +41091,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
|
|
|
41111
41091
|
if (typeof visitFn === 'function') {
|
|
41112
41092
|
const proxyPath = createPathProxy(path, currentNode);
|
|
41113
41093
|
const result = await visitFn.call(visitors[i], proxyPath);
|
|
41094
|
+
|
|
41095
|
+
// Handle path-based control flow
|
|
41096
|
+
// Note: no break here — other merged visitors must still process this node
|
|
41114
41097
|
if (proxyPath.shouldStop) {
|
|
41115
41098
|
skipping[i] = breakSymbol;
|
|
41116
|
-
break;
|
|
41117
41099
|
}
|
|
41118
41100
|
if (proxyPath.shouldSkip) {
|
|
41119
41101
|
skipping[i] = currentNode;
|
|
@@ -41143,6 +41125,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
|
|
|
41143
41125
|
}
|
|
41144
41126
|
}
|
|
41145
41127
|
}
|
|
41128
|
+
|
|
41129
|
+
// stop traversal only when all visitors have stopped
|
|
41130
|
+
if (skipping.every(s => s === breakSymbol)) {
|
|
41131
|
+
path.stop();
|
|
41132
|
+
}
|
|
41146
41133
|
if (hasChanged) {
|
|
41147
41134
|
path.replaceWith(currentNode);
|
|
41148
41135
|
return currentNode;
|
|
@@ -41157,9 +41144,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
|
|
|
41157
41144
|
if (typeof visitFn === 'function') {
|
|
41158
41145
|
const proxyPath = createPathProxy(path, currentNode);
|
|
41159
41146
|
const result = await visitFn.call(visitors[i], proxyPath);
|
|
41147
|
+
|
|
41148
|
+
// Handle path-based control flow
|
|
41149
|
+
// Note: no break here — other merged visitors must still process this node
|
|
41160
41150
|
if (proxyPath.shouldStop) {
|
|
41161
41151
|
skipping[i] = breakSymbol;
|
|
41162
|
-
break;
|
|
41163
41152
|
}
|
|
41164
41153
|
if (proxyPath.removed) {
|
|
41165
41154
|
path.remove();
|
|
@@ -41178,6 +41167,11 @@ const mergeVisitorsAsync = (visitors, options = {}) => {
|
|
|
41178
41167
|
skipping[i] = internalSkipSymbol;
|
|
41179
41168
|
}
|
|
41180
41169
|
}
|
|
41170
|
+
|
|
41171
|
+
// stop traversal only when all visitors have stopped
|
|
41172
|
+
if (skipping.every(s => s === breakSymbol)) {
|
|
41173
|
+
path.stop();
|
|
41174
|
+
}
|
|
41181
41175
|
return undefined;
|
|
41182
41176
|
}
|
|
41183
41177
|
};
|