@speclynx/apidom-parser-adapter-openapi-json-3-1 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-3-1
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-3-1
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-3-1
@@ -14731,8 +14731,10 @@ __webpack_require__.r(__webpack_exports__);
14731
14731
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
14732
14732
  /* harmony export */ Path: () => (/* binding */ Path)
14733
14733
  /* harmony export */ });
14734
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(61198);
14735
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(33204);
14734
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
14735
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
14736
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
14737
+
14736
14738
 
14737
14739
 
14738
14740
 
@@ -14874,14 +14876,34 @@ class Path {
14874
14876
  }
14875
14877
 
14876
14878
  /**
14877
- * Get the path from root as an array of keys.
14879
+ * Get the semantic path from root as an array of keys.
14880
+ * Returns logical document keys (property names, array indices) rather than
14881
+ * internal ApiDOM structure keys.
14882
+ *
14883
+ * @example
14884
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
14885
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
14878
14886
  */
14879
14887
  getPathKeys() {
14880
14888
  const keys = [];
14881
14889
  // eslint-disable-next-line @typescript-eslint/no-this-alias
14882
14890
  let current = this;
14883
14891
  while (current !== null && current.key !== undefined) {
14884
- keys.unshift(current.key);
14892
+ const {
14893
+ key,
14894
+ parent,
14895
+ parentPath
14896
+ } = current;
14897
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
14898
+ // Inside MemberElement.value → push the member's key
14899
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
14900
+ throw new TypeError('MemberElement.key must be a StringElement');
14901
+ }
14902
+ keys.unshift(parent.key.toValue());
14903
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
14904
+ // Inside ArrayElement → push the numeric index
14905
+ keys.unshift(key);
14906
+ }
14885
14907
  current = current.parentPath;
14886
14908
  }
14887
14909
  return keys;
@@ -14917,11 +14939,11 @@ class Path {
14917
14939
  }
14918
14940
  if (pathFormat === 'jsonpath') {
14919
14941
  // RFC 9535 Normalized JSONPath
14920
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
14942
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
14921
14943
  }
14922
14944
 
14923
14945
  // RFC 6901 JSON Pointer
14924
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
14946
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
14925
14947
  }
14926
14948
 
14927
14949
  /**