@speclynx/apidom-ns-openapi-3-0 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-ns-openapi-3-0
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-ns-openapi-3-0
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-ns-openapi-3-0
@@ -2072,8 +2072,10 @@ __webpack_require__.r(__webpack_exports__);
2072
2072
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
2073
2073
  /* harmony export */ Path: () => (/* binding */ Path)
2074
2074
  /* harmony export */ });
2075
- /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(1198);
2076
- /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(3204);
2075
+ /* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
2076
+ /* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1198);
2077
+ /* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3204);
2078
+
2077
2079
 
2078
2080
 
2079
2081
 
@@ -2215,14 +2217,34 @@ class Path {
2215
2217
  }
2216
2218
 
2217
2219
  /**
2218
- * Get the path from root as an array of keys.
2220
+ * Get the semantic path from root as an array of keys.
2221
+ * Returns logical document keys (property names, array indices) rather than
2222
+ * internal ApiDOM structure keys.
2223
+ *
2224
+ * @example
2225
+ * // For a path to $.paths['/pets'].get in an OpenAPI document:
2226
+ * path.getPathKeys(); // => ['paths', '/pets', 'get']
2219
2227
  */
2220
2228
  getPathKeys() {
2221
2229
  const keys = [];
2222
2230
  // eslint-disable-next-line @typescript-eslint/no-this-alias
2223
2231
  let current = this;
2224
2232
  while (current !== null && current.key !== undefined) {
2225
- keys.unshift(current.key);
2233
+ const {
2234
+ key,
2235
+ parent,
2236
+ parentPath
2237
+ } = current;
2238
+ if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
2239
+ // Inside MemberElement.value → push the member's key
2240
+ if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
2241
+ throw new TypeError('MemberElement.key must be a StringElement');
2242
+ }
2243
+ keys.unshift(parent.key.toValue());
2244
+ } else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
2245
+ // Inside ArrayElement → push the numeric index
2246
+ keys.unshift(key);
2247
+ }
2226
2248
  current = current.parentPath;
2227
2249
  }
2228
2250
  return keys;
@@ -2258,11 +2280,11 @@ class Path {
2258
2280
  }
2259
2281
  if (pathFormat === 'jsonpath') {
2260
2282
  // RFC 9535 Normalized JSONPath
2261
- return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_1__.NormalizedPath.from(parts);
2283
+ return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
2262
2284
  }
2263
2285
 
2264
2286
  // RFC 6901 JSON Pointer
2265
- return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_0__.compile)(parts);
2287
+ return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
2266
2288
  }
2267
2289
 
2268
2290
  /**