@speclynx/apidom-ns-openapi-3-1 4.1.0 → 4.2.0
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 +7 -0
- package/README.md +25 -24
- package/dist/apidom-ns-openapi-3-1.browser.js +6 -6
- package/dist/apidom-ns-openapi-3-1.browser.min.js +1 -1
- package/package.json +8 -8
- package/src/refractor/plugins/normalize-header-examples.cjs +1 -1
- package/src/refractor/plugins/normalize-header-examples.mjs +1 -1
- package/src/refractor/plugins/normalize-parameter-examples.cjs +1 -1
- package/src/refractor/plugins/normalize-parameter-examples.mjs +1 -1
- package/src/refractor/plugins/normalize-security-requirements.cjs +1 -1
- package/src/refractor/plugins/normalize-security-requirements.mjs +1 -1
- package/src/refractor/plugins/normalize-servers.cjs +3 -3
- package/src/refractor/plugins/normalize-servers.mjs +3 -3
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,13 @@
|
|
|
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
|
+
# [4.2.0](https://github.com/speclynx/apidom/compare/v4.1.0...v4.2.0) (2026-03-17)
|
|
7
|
+
|
|
8
|
+
### Features
|
|
9
|
+
|
|
10
|
+
- **ns-openapi-2-0:** add normalization refractor plugins ([#170](https://github.com/speclynx/apidom/issues/170)) ([315b5c6](https://github.com/speclynx/apidom/commit/315b5c620f752941749df13c0a5ab4bd14d41597))
|
|
11
|
+
- **ns-openapi-3-0:** add normalization refractor plugins ([#169](https://github.com/speclynx/apidom/issues/169)) ([fb0ec23](https://github.com/speclynx/apidom/commit/fb0ec23dd8c933a9a4d72762f3fb643e3e11d037))
|
|
12
|
+
|
|
6
13
|
# [4.1.0](https://github.com/speclynx/apidom/compare/v4.0.5...v4.1.0) (2026-03-16)
|
|
7
14
|
|
|
8
15
|
### Features
|
package/README.md
CHANGED
|
@@ -251,7 +251,7 @@ toValue(openApiElement);
|
|
|
251
251
|
|
|
252
252
|
Duplicates Parameters from Path Items to Operation Objects using following rules:
|
|
253
253
|
|
|
254
|
-
-
|
|
254
|
+
- An Operation-level parameter with the same name and location overrides the inherited Path Item parameter, but Path Item parameters can never be removed at the Operation level
|
|
255
255
|
- The list MUST NOT include duplicated parameters
|
|
256
256
|
- A unique parameter is defined by a combination of a name and location.
|
|
257
257
|
|
|
@@ -281,30 +281,31 @@ toValue(openApiElement);
|
|
|
281
281
|
// {
|
|
282
282
|
// "openapi": "3.1.0",
|
|
283
283
|
// "paths": {
|
|
284
|
-
//
|
|
285
|
-
// "parameters": [
|
|
286
|
-
// {
|
|
287
|
-
// "name": "param1",
|
|
288
|
-
// "in": "query"
|
|
289
|
-
// },
|
|
290
|
-
// {
|
|
291
|
-
// "name": "param2",
|
|
292
|
-
// "in": "query"
|
|
293
|
-
// }
|
|
294
|
-
// ],
|
|
295
|
-
// "get": {
|
|
284
|
+
// "/": {
|
|
296
285
|
// "parameters": [
|
|
297
|
-
//
|
|
298
|
-
//
|
|
299
|
-
//
|
|
300
|
-
//
|
|
301
|
-
//
|
|
302
|
-
//
|
|
303
|
-
//
|
|
304
|
-
//
|
|
305
|
-
//
|
|
306
|
-
//
|
|
307
|
-
//
|
|
286
|
+
// {
|
|
287
|
+
// "name": "param1",
|
|
288
|
+
// "in": "query"
|
|
289
|
+
// },
|
|
290
|
+
// {
|
|
291
|
+
// "name": "param2",
|
|
292
|
+
// "in": "query"
|
|
293
|
+
// }
|
|
294
|
+
// ],
|
|
295
|
+
// "get": {
|
|
296
|
+
// "parameters": [
|
|
297
|
+
// {
|
|
298
|
+
// "name": "param1",
|
|
299
|
+
// "in": "query"
|
|
300
|
+
// },
|
|
301
|
+
// {
|
|
302
|
+
// "name": "param2",
|
|
303
|
+
// "in": "query"
|
|
304
|
+
// }
|
|
305
|
+
// ]
|
|
306
|
+
// }
|
|
307
|
+
// }
|
|
308
|
+
// }
|
|
308
309
|
// }
|
|
309
310
|
```
|
|
310
311
|
|
|
@@ -1720,7 +1720,7 @@ const plugin = ({
|
|
|
1720
1720
|
HeaderElement: {
|
|
1721
1721
|
leave(path) {
|
|
1722
1722
|
const headerElement = path.node;
|
|
1723
|
-
const ancestors = path.getAncestorNodes()
|
|
1723
|
+
const ancestors = path.getAncestorNodes(); // parent to root order
|
|
1724
1724
|
|
|
1725
1725
|
// skip visiting this Header Object
|
|
1726
1726
|
if (ancestors.some(predicates.isComponentsElement)) {
|
|
@@ -2011,7 +2011,7 @@ const plugin = ({
|
|
|
2011
2011
|
ParameterElement: {
|
|
2012
2012
|
leave(path) {
|
|
2013
2013
|
const parameterElement = path.node;
|
|
2014
|
-
const ancestors = path.getAncestorNodes()
|
|
2014
|
+
const ancestors = path.getAncestorNodes(); // parent to root order
|
|
2015
2015
|
|
|
2016
2016
|
// skip visiting this Parameter Object
|
|
2017
2017
|
if (ancestors.some(predicates.isComponentsElement)) {
|
|
@@ -2263,7 +2263,7 @@ const plugin = ({
|
|
|
2263
2263
|
OperationElement: {
|
|
2264
2264
|
leave(path) {
|
|
2265
2265
|
const operationElement = path.node;
|
|
2266
|
-
const ancestors = path.getAncestorNodes()
|
|
2266
|
+
const ancestors = path.getAncestorNodes(); // parent to root order
|
|
2267
2267
|
|
|
2268
2268
|
// skip visiting this Operation
|
|
2269
2269
|
if (ancestors.some(predicates.isComponentsElement)) {
|
|
@@ -2404,7 +2404,7 @@ const plugin = ({
|
|
|
2404
2404
|
},
|
|
2405
2405
|
PathItemElement(path) {
|
|
2406
2406
|
const pathItemElement = path.node;
|
|
2407
|
-
const ancestors = path.getAncestorNodes()
|
|
2407
|
+
const ancestors = path.getAncestorNodes(); // parent to root order
|
|
2408
2408
|
|
|
2409
2409
|
// skip visiting this Path Item
|
|
2410
2410
|
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
@@ -2423,7 +2423,7 @@ const plugin = ({
|
|
|
2423
2423
|
},
|
|
2424
2424
|
OperationElement(path) {
|
|
2425
2425
|
const operationElement = path.node;
|
|
2426
|
-
const ancestors = path.getAncestorNodes()
|
|
2426
|
+
const ancestors = path.getAncestorNodes(); // parent to root order
|
|
2427
2427
|
|
|
2428
2428
|
// skip visiting this Operation
|
|
2429
2429
|
if (ancestors.some(predicates.isComponentsElement)) return;
|
|
@@ -2434,7 +2434,7 @@ const plugin = ({
|
|
|
2434
2434
|
if (storage.includes(operationJSONPointer)) {
|
|
2435
2435
|
return;
|
|
2436
2436
|
}
|
|
2437
|
-
const parentPathItemElement = ancestors.
|
|
2437
|
+
const parentPathItemElement = ancestors.find(predicates.isPathItemElement);
|
|
2438
2438
|
if (predicates.isPathItemElement(parentPathItemElement)) {
|
|
2439
2439
|
inheritServersToOperation(operationElement, parentPathItemElement);
|
|
2440
2440
|
storage.append(operationJSONPointer);
|