@speclynx/apidom-parser-adapter-asyncapi-json-2 2.2.0 → 2.2.2
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
|
+
## [2.2.2](https://github.com/speclynx/apidom/compare/v2.2.1...v2.2.2) (2026-01-23)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-asyncapi-json-2
|
|
9
|
+
|
|
10
|
+
## [2.2.1](https://github.com/speclynx/apidom/compare/v2.2.0...v2.2.1) (2026-01-20)
|
|
11
|
+
|
|
12
|
+
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-asyncapi-json-2
|
|
13
|
+
|
|
6
14
|
# [2.2.0](https://github.com/speclynx/apidom/compare/v2.1.0...v2.2.0) (2026-01-19)
|
|
7
15
|
|
|
8
16
|
**Note:** Version bump only for package @speclynx/apidom-parser-adapter-asyncapi-json-2
|
|
@@ -15566,8 +15566,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15566
15566
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15567
15567
|
/* harmony export */ Path: () => (/* binding */ Path)
|
|
15568
15568
|
/* harmony export */ });
|
|
15569
|
-
/* harmony import */ var
|
|
15570
|
-
/* harmony import */ var
|
|
15569
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
|
|
15570
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
|
|
15571
|
+
/* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
|
|
15572
|
+
|
|
15571
15573
|
|
|
15572
15574
|
|
|
15573
15575
|
|
|
@@ -15709,14 +15711,34 @@ class Path {
|
|
|
15709
15711
|
}
|
|
15710
15712
|
|
|
15711
15713
|
/**
|
|
15712
|
-
* Get the path from root as an array of keys.
|
|
15714
|
+
* Get the semantic path from root as an array of keys.
|
|
15715
|
+
* Returns logical document keys (property names, array indices) rather than
|
|
15716
|
+
* internal ApiDOM structure keys.
|
|
15717
|
+
*
|
|
15718
|
+
* @example
|
|
15719
|
+
* // For a path to $.paths['/pets'].get in an OpenAPI document:
|
|
15720
|
+
* path.getPathKeys(); // => ['paths', '/pets', 'get']
|
|
15713
15721
|
*/
|
|
15714
15722
|
getPathKeys() {
|
|
15715
15723
|
const keys = [];
|
|
15716
15724
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
15717
15725
|
let current = this;
|
|
15718
15726
|
while (current !== null && current.key !== undefined) {
|
|
15719
|
-
|
|
15727
|
+
const {
|
|
15728
|
+
key,
|
|
15729
|
+
parent,
|
|
15730
|
+
parentPath
|
|
15731
|
+
} = current;
|
|
15732
|
+
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
|
|
15733
|
+
// Inside MemberElement.value → push the member's key
|
|
15734
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
|
|
15735
|
+
throw new TypeError('MemberElement.key must be a StringElement');
|
|
15736
|
+
}
|
|
15737
|
+
keys.unshift(parent.key.toValue());
|
|
15738
|
+
} else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
|
|
15739
|
+
// Inside ArrayElement → push the numeric index
|
|
15740
|
+
keys.unshift(key);
|
|
15741
|
+
}
|
|
15720
15742
|
current = current.parentPath;
|
|
15721
15743
|
}
|
|
15722
15744
|
return keys;
|
|
@@ -15752,11 +15774,11 @@ class Path {
|
|
|
15752
15774
|
}
|
|
15753
15775
|
if (pathFormat === 'jsonpath') {
|
|
15754
15776
|
// RFC 9535 Normalized JSONPath
|
|
15755
|
-
return
|
|
15777
|
+
return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
|
|
15756
15778
|
}
|
|
15757
15779
|
|
|
15758
15780
|
// RFC 6901 JSON Pointer
|
|
15759
|
-
return (0,
|
|
15781
|
+
return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
|
|
15760
15782
|
}
|
|
15761
15783
|
|
|
15762
15784
|
/**
|