@speclynx/apidom-parser-adapter-openapi-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-openapi-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-openapi-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-openapi-json-2
@@ -2299,8 +2299,10 @@ __webpack_require__.r(__webpack_exports__);
2299
2299
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2300
2300
  /* harmony export */ Path: () => (/* binding */ Path)
2301
2301
  /* harmony export */ });
2302
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1198);
2303
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3204);
2302
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
2303
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1198);
2304
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3204);
2305
+
2304
2306
 
2305
2307
 
2306
2308
 
@@ -2442,14 +2444,34 @@ class Path {
2442
2444
  }
2443
2445
 
2444
2446
  /**
2445
- * Get the path from root as an array of keys.
2447
+ * Get the semantic path from root as an array of keys.
2448
+ * Returns logical document keys (property names, array indices) rather than
2449
+ * internal ApiDOM structure keys.
2450
+ *
2451
+ * @example
2452
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
2453
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
2446
2454
  */
2447
2455
  getPathKeys() {
2448
2456
  const keys = [];
2449
2457
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2450
2458
  let current = this;
2451
2459
  while (current !== null && current.key !== undefined) {
2452
- keys.unshift(current.key);
2460
+ const {
2461
+ key,
2462
+ parent,
2463
+ parentPath
2464
+ } = current;
2465
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
2466
+ // Inside MemberElement.value → push the member's key
2467
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
2468
+ throw new TypeError('MemberElement.key must be a StringElement');
2469
+ }
2470
+ keys.unshift(parent.key.toValue());
2471
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
2472
+ // Inside ArrayElement → push the numeric index
2473
+ keys.unshift(key);
2474
+ }
2453
2475
  current = current.parentPath;
2454
2476
  }
2455
2477
  return keys;
@@ -2485,11 +2507,11 @@ class Path {
2485
2507
  }
2486
2508
  if (pathFormat === 'jsonpath') {
2487
2509
  // RFC 9535 Normalized JSONPath
2488
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
2510
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
2489
2511
  }
2490
2512
 
2491
2513
  // RFC 6901 JSON Pointer
2492
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
2514
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
2493
2515
  }
2494
2516
 
2495
2517
  /**