@speclynx/apidom-parser-adapter-openapi-yaml-3-0 2.2.0 → 2.2.1

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,10 @@
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.1](https://github.com/speclynx/apidom/compare/v2.2.0...v2.2.1) (2026-01-20)
7
+
8
+ **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-yaml-3-0
9
+
6
10
  # [2.2.0](https://github.com/speclynx/apidom/compare/v2.1.0...v2.2.0) (2026-01-19)
7
11
 
8
12
  **Note:** Version bump only for package @speclynx/apidom-parser-adapter-openapi-yaml-3-0
@@ -17223,8 +17223,10 @@ __webpack_require__.r(__webpack_exports__);
17223
17223
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
17224
17224
  /* harmony export */ Path: () => (/* binding */ Path)
17225
17225
  /* harmony export */ });
17226
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
17227
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33204);
17226
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
17227
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
17228
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
17229
+
17228
17230
 
17229
17231
 
17230
17232
 
@@ -17366,14 +17368,34 @@ class Path {
17366
17368
  }
17367
17369
 
17368
17370
  /**
17369
- * Get the path from root as an array of keys.
17371
+ * Get the semantic path from root as an array of keys.
17372
+ * Returns logical document keys (property names, array indices) rather than
17373
+ * internal ApiDOM structure keys.
17374
+ *
17375
+ * @example
17376
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
17377
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
17370
17378
  */
17371
17379
  getPathKeys() {
17372
17380
  const keys = [];
17373
17381
  // eslint-disable-next-line @typescript-eslint/no-this-alias
17374
17382
  let current = this;
17375
17383
  while (current !== null && current.key !== undefined) {
17376
- keys.unshift(current.key);
17384
+ const {
17385
+ key,
17386
+ parent,
17387
+ parentPath
17388
+ } = current;
17389
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
17390
+ // Inside MemberElement.value → push the member's key
17391
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
17392
+ throw new TypeError('MemberElement.key must be a StringElement');
17393
+ }
17394
+ keys.unshift(parent.key.toValue());
17395
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
17396
+ // Inside ArrayElement → push the numeric index
17397
+ keys.unshift(key);
17398
+ }
17377
17399
  current = current.parentPath;
17378
17400
  }
17379
17401
  return keys;
@@ -17409,11 +17431,11 @@ class Path {
17409
17431
  }
17410
17432
  if (pathFormat === 'jsonpath') {
17411
17433
  // RFC 9535 Normalized JSONPath
17412
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
17434
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
17413
17435
  }
17414
17436
 
17415
17437
  // RFC 6901 JSON Pointer
17416
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
17438
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
17417
17439
  }
17418
17440
 
17419
17441
  /**