@speclynx/apidom-parser-adapter-openapi-json-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-parser-adapter-openapi-json-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-parser-adapter-openapi-json-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-parser-adapter-openapi-json-3-0
|
|
@@ -2130,8 +2130,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
2130
2130
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
2131
2131
|
/* harmony export */ Path: () => (/* binding */ Path)
|
|
2132
2132
|
/* harmony export */ });
|
|
2133
|
-
/* harmony import */ var
|
|
2134
|
-
/* harmony import */ var
|
|
2133
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(5162);
|
|
2134
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(1198);
|
|
2135
|
+
/* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(3204);
|
|
2136
|
+
|
|
2135
2137
|
|
|
2136
2138
|
|
|
2137
2139
|
|
|
@@ -2273,14 +2275,34 @@ class Path {
|
|
|
2273
2275
|
}
|
|
2274
2276
|
|
|
2275
2277
|
/**
|
|
2276
|
-
* Get the path from root as an array of keys.
|
|
2278
|
+
* Get the semantic path from root as an array of keys.
|
|
2279
|
+
* Returns logical document keys (property names, array indices) rather than
|
|
2280
|
+
* internal ApiDOM structure keys.
|
|
2281
|
+
*
|
|
2282
|
+
* @example
|
|
2283
|
+
* // For a path to $.paths['/pets'].get in an OpenAPI document:
|
|
2284
|
+
* path.getPathKeys(); // => ['paths', '/pets', 'get']
|
|
2277
2285
|
*/
|
|
2278
2286
|
getPathKeys() {
|
|
2279
2287
|
const keys = [];
|
|
2280
2288
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
2281
2289
|
let current = this;
|
|
2282
2290
|
while (current !== null && current.key !== undefined) {
|
|
2283
|
-
|
|
2291
|
+
const {
|
|
2292
|
+
key,
|
|
2293
|
+
parent,
|
|
2294
|
+
parentPath
|
|
2295
|
+
} = current;
|
|
2296
|
+
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
|
|
2297
|
+
// Inside MemberElement.value → push the member's key
|
|
2298
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
|
|
2299
|
+
throw new TypeError('MemberElement.key must be a StringElement');
|
|
2300
|
+
}
|
|
2301
|
+
keys.unshift(parent.key.toValue());
|
|
2302
|
+
} else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
|
|
2303
|
+
// Inside ArrayElement → push the numeric index
|
|
2304
|
+
keys.unshift(key);
|
|
2305
|
+
}
|
|
2284
2306
|
current = current.parentPath;
|
|
2285
2307
|
}
|
|
2286
2308
|
return keys;
|
|
@@ -2316,11 +2338,11 @@ class Path {
|
|
|
2316
2338
|
}
|
|
2317
2339
|
if (pathFormat === 'jsonpath') {
|
|
2318
2340
|
// RFC 9535 Normalized JSONPath
|
|
2319
|
-
return
|
|
2341
|
+
return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
|
|
2320
2342
|
}
|
|
2321
2343
|
|
|
2322
2344
|
// RFC 6901 JSON Pointer
|
|
2323
|
-
return (0,
|
|
2345
|
+
return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
|
|
2324
2346
|
}
|
|
2325
2347
|
|
|
2326
2348
|
/**
|