@speclynx/apidom-parser-adapter-json-schema-json-2020-12 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-json-schema-json-2020-12
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-json-schema-json-2020-12
@@ -1872,8 +1872,10 @@ __webpack_require__.r(__webpack_exports__);
1872
1872
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
1873
1873
  /* harmony export */ Path: () => (/* binding */ Path)
1874
1874
  /* harmony export */ });
1875
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1198);
1876
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3204);
1875
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
1876
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1198);
1877
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3204);
1878
+
1877
1879
 
1878
1880
 
1879
1881
 
@@ -2015,14 +2017,34 @@ class Path {
2015
2017
  }
2016
2018
 
2017
2019
  /**
2018
- * Get the path from root as an array of keys.
2020
+ * Get the semantic path from root as an array of keys.
2021
+ * Returns logical document keys (property names, array indices) rather than
2022
+ * internal ApiDOM structure keys.
2023
+ *
2024
+ * @example
2025
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
2026
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
2019
2027
  */
2020
2028
  getPathKeys() {
2021
2029
  const keys = [];
2022
2030
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2023
2031
  let current = this;
2024
2032
  while (current !== null && current.key !== undefined) {
2025
- keys.unshift(current.key);
2033
+ const {
2034
+ key,
2035
+ parent,
2036
+ parentPath
2037
+ } = current;
2038
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
2039
+ // Inside MemberElement.value → push the member's key
2040
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
2041
+ throw new TypeError('MemberElement.key must be a StringElement');
2042
+ }
2043
+ keys.unshift(parent.key.toValue());
2044
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
2045
+ // Inside ArrayElement → push the numeric index
2046
+ keys.unshift(key);
2047
+ }
2026
2048
  current = current.parentPath;
2027
2049
  }
2028
2050
  return keys;
@@ -2058,11 +2080,11 @@ class Path {
2058
2080
  }
2059
2081
  if (pathFormat === 'jsonpath') {
2060
2082
  // RFC 9535 Normalized JSONPath
2061
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
2083
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
2062
2084
  }
2063
2085
 
2064
2086
  // RFC 6901 JSON Pointer
2065
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
2087
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
2066
2088
  }
2067
2089
 
2068
2090
  /**