@speclynx/apidom-parser-adapter-json-schema-yaml-2020-12 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-json-schema-yaml-2020-12
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-json-schema-yaml-2020-12
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-json-schema-yaml-2020-12
@@ -2752,8 +2752,10 @@ __webpack_require__.r(__webpack_exports__);
2752
2752
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2753
2753
  /* harmony export */ Path: () => (/* binding */ Path)
2754
2754
  /* harmony export */ });
2755
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1198);
2756
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(823);
2755
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
2756
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1198);
2757
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(823);
2758
+
2757
2759
 
2758
2760
 
2759
2761
 
@@ -2895,14 +2897,34 @@ class Path {
2895
2897
  }
2896
2898
 
2897
2899
  /**
2898
- * Get the path from root as an array of keys.
2900
+ * Get the semantic path from root as an array of keys.
2901
+ * Returns logical document keys (property names, array indices) rather than
2902
+ * internal ApiDOM structure keys.
2903
+ *
2904
+ * @example
2905
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
2906
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
2899
2907
  */
2900
2908
  getPathKeys() {
2901
2909
  const keys = [];
2902
2910
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2903
2911
  let current = this;
2904
2912
  while (current !== null && current.key !== undefined) {
2905
- keys.unshift(current.key);
2913
+ const {
2914
+ key,
2915
+ parent,
2916
+ parentPath
2917
+ } = current;
2918
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
2919
+ // Inside MemberElement.value → push the member's key
2920
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
2921
+ throw new TypeError('MemberElement.key must be a StringElement');
2922
+ }
2923
+ keys.unshift(parent.key.toValue());
2924
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
2925
+ // Inside ArrayElement → push the numeric index
2926
+ keys.unshift(key);
2927
+ }
2906
2928
  current = current.parentPath;
2907
2929
  }
2908
2930
  return keys;
@@ -2938,11 +2960,11 @@ class Path {
2938
2960
  }
2939
2961
  if (pathFormat === 'jsonpath') {
2940
2962
  // RFC 9535 Normalized JSONPath
2941
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
2963
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
2942
2964
  }
2943
2965
 
2944
2966
  // RFC 6901 JSON Pointer
2945
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
2967
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
2946
2968
  }
2947
2969
 
2948
2970
  /**