@speclynx/apidom-parser-adapter-openapi-yaml-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-yaml-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-yaml-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-yaml-2
@@ -15857,8 +15857,10 @@ __webpack_require__.r(__webpack_exports__);
15857
15857
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
15858
15858
  /* harmony export */ Path: () => (/* binding */ Path)
15859
15859
  /* harmony export */ });
15860
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
15861
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33204);
15860
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
15861
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
15862
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
15863
+
15862
15864
 
15863
15865
 
15864
15866
 
@@ -16000,14 +16002,34 @@ class Path {
16000
16002
  }
16001
16003
 
16002
16004
  /**
16003
- * Get the path from root as an array of keys.
16005
+ * Get the semantic path from root as an array of keys.
16006
+ * Returns logical document keys (property names, array indices) rather than
16007
+ * internal ApiDOM structure keys.
16008
+ *
16009
+ * @example
16010
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
16011
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
16004
16012
  */
16005
16013
  getPathKeys() {
16006
16014
  const keys = [];
16007
16015
  // eslint-disable-next-line @typescript-eslint/no-this-alias
16008
16016
  let current = this;
16009
16017
  while (current !== null && current.key !== undefined) {
16010
- keys.unshift(current.key);
16018
+ const {
16019
+ key,
16020
+ parent,
16021
+ parentPath
16022
+ } = current;
16023
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
16024
+ // Inside MemberElement.value → push the member's key
16025
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
16026
+ throw new TypeError('MemberElement.key must be a StringElement');
16027
+ }
16028
+ keys.unshift(parent.key.toValue());
16029
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
16030
+ // Inside ArrayElement → push the numeric index
16031
+ keys.unshift(key);
16032
+ }
16011
16033
  current = current.parentPath;
16012
16034
  }
16013
16035
  return keys;
@@ -16043,11 +16065,11 @@ class Path {
16043
16065
  }
16044
16066
  if (pathFormat === 'jsonpath') {
16045
16067
  // RFC 9535 Normalized JSONPath
16046
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
16068
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
16047
16069
  }
16048
16070
 
16049
16071
  // RFC 6901 JSON Pointer
16050
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
16072
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
16051
16073
  }
16052
16074
 
16053
16075
  /**