@speclynx/apidom-reference 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-reference
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-reference
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-reference
@@ -38507,8 +38507,10 @@ __webpack_require__.r(__webpack_exports__);
38507
38507
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
38508
38508
  /* harmony export */ Path: () => (/* binding */ Path)
38509
38509
  /* harmony export */ });
38510
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
38511
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33204);
38510
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
38511
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
38512
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
38513
+
38512
38514
 
38513
38515
 
38514
38516
 
@@ -38650,14 +38652,34 @@ class Path {
38650
38652
  }
38651
38653
 
38652
38654
  /**
38653
- * Get the path from root as an array of keys.
38655
+ * Get the semantic path from root as an array of keys.
38656
+ * Returns logical document keys (property names, array indices) rather than
38657
+ * internal ApiDOM structure keys.
38658
+ *
38659
+ * @example
38660
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
38661
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
38654
38662
  */
38655
38663
  getPathKeys() {
38656
38664
  const keys = [];
38657
38665
  // eslint-disable-next-line @typescript-eslint/no-this-alias
38658
38666
  let current = this;
38659
38667
  while (current !== null && current.key !== undefined) {
38660
- keys.unshift(current.key);
38668
+ const {
38669
+ key,
38670
+ parent,
38671
+ parentPath
38672
+ } = current;
38673
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
38674
+ // Inside MemberElement.value → push the member's key
38675
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
38676
+ throw new TypeError('MemberElement.key must be a StringElement');
38677
+ }
38678
+ keys.unshift(parent.key.toValue());
38679
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
38680
+ // Inside ArrayElement → push the numeric index
38681
+ keys.unshift(key);
38682
+ }
38661
38683
  current = current.parentPath;
38662
38684
  }
38663
38685
  return keys;
@@ -38693,11 +38715,11 @@ class Path {
38693
38715
  }
38694
38716
  if (pathFormat === 'jsonpath') {
38695
38717
  // RFC 9535 Normalized JSONPath
38696
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
38718
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
38697
38719
  }
38698
38720
 
38699
38721
  // RFC 6901 JSON Pointer
38700
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
38722
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
38701
38723
  }
38702
38724
 
38703
38725
  /**