@speclynx/apidom-ns-openapi-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-ns-openapi-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-ns-openapi-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-ns-openapi-3-1
|
|
@@ -15991,8 +15991,10 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
15991
15991
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
15992
15992
|
/* harmony export */ Path: () => (/* binding */ Path)
|
|
15993
15993
|
/* harmony export */ });
|
|
15994
|
-
/* harmony import */ var
|
|
15995
|
-
/* harmony import */ var
|
|
15994
|
+
/* harmony import */ var _speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(25162);
|
|
15995
|
+
/* harmony import */ var _speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(61198);
|
|
15996
|
+
/* harmony import */ var _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(33204);
|
|
15997
|
+
|
|
15996
15998
|
|
|
15997
15999
|
|
|
15998
16000
|
|
|
@@ -16134,14 +16136,34 @@ class Path {
|
|
|
16134
16136
|
}
|
|
16135
16137
|
|
|
16136
16138
|
/**
|
|
16137
|
-
* Get the path from root as an array of keys.
|
|
16139
|
+
* Get the semantic path from root as an array of keys.
|
|
16140
|
+
* Returns logical document keys (property names, array indices) rather than
|
|
16141
|
+
* internal ApiDOM structure keys.
|
|
16142
|
+
*
|
|
16143
|
+
* @example
|
|
16144
|
+
* // For a path to $.paths['/pets'].get in an OpenAPI document:
|
|
16145
|
+
* path.getPathKeys(); // => ['paths', '/pets', 'get']
|
|
16138
16146
|
*/
|
|
16139
16147
|
getPathKeys() {
|
|
16140
16148
|
const keys = [];
|
|
16141
16149
|
// eslint-disable-next-line @typescript-eslint/no-this-alias
|
|
16142
16150
|
let current = this;
|
|
16143
16151
|
while (current !== null && current.key !== undefined) {
|
|
16144
|
-
|
|
16152
|
+
const {
|
|
16153
|
+
key,
|
|
16154
|
+
parent,
|
|
16155
|
+
parentPath
|
|
16156
|
+
} = current;
|
|
16157
|
+
if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isMemberElement)(parent) && key === 'value') {
|
|
16158
|
+
// Inside MemberElement.value → push the member's key
|
|
16159
|
+
if (!(0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isStringElement)(parent.key)) {
|
|
16160
|
+
throw new TypeError('MemberElement.key must be a StringElement');
|
|
16161
|
+
}
|
|
16162
|
+
keys.unshift(parent.key.toValue());
|
|
16163
|
+
} else if ((0,_speclynx_apidom_datamodel__WEBPACK_IMPORTED_MODULE_0__.isArrayElement)(parentPath?.node) && typeof key === 'number') {
|
|
16164
|
+
// Inside ArrayElement → push the numeric index
|
|
16165
|
+
keys.unshift(key);
|
|
16166
|
+
}
|
|
16145
16167
|
current = current.parentPath;
|
|
16146
16168
|
}
|
|
16147
16169
|
return keys;
|
|
@@ -16177,11 +16199,11 @@ class Path {
|
|
|
16177
16199
|
}
|
|
16178
16200
|
if (pathFormat === 'jsonpath') {
|
|
16179
16201
|
// RFC 9535 Normalized JSONPath
|
|
16180
|
-
return
|
|
16202
|
+
return _speclynx_apidom_json_path__WEBPACK_IMPORTED_MODULE_2__.NormalizedPath.from(parts);
|
|
16181
16203
|
}
|
|
16182
16204
|
|
|
16183
16205
|
// RFC 6901 JSON Pointer
|
|
16184
|
-
return (0,
|
|
16206
|
+
return (0,_speclynx_apidom_json_pointer__WEBPACK_IMPORTED_MODULE_1__.compile)(parts);
|
|
16185
16207
|
}
|
|
16186
16208
|
|
|
16187
16209
|
/**
|