@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@speclynx/apidom-ns-openapi-3-1",
3
- "version": "4.1.0",
3
+ "version": "4.2.0",
4
4
  "description": "OpenAPI 3.1.x namespace for ApiDOM.",
5
5
  "keywords": [
6
6
  "apidom",
@@ -60,12 +60,12 @@
60
60
  "license": "Apache-2.0",
61
61
  "dependencies": {
62
62
  "@babel/runtime-corejs3": "^7.28.4",
63
- "@speclynx/apidom-core": "4.1.0",
64
- "@speclynx/apidom-datamodel": "4.1.0",
65
- "@speclynx/apidom-json-pointer": "4.1.0",
66
- "@speclynx/apidom-ns-json-schema-2020-12": "4.1.0",
67
- "@speclynx/apidom-ns-openapi-3-0": "4.1.0",
68
- "@speclynx/apidom-traverse": "4.1.0",
63
+ "@speclynx/apidom-core": "4.2.0",
64
+ "@speclynx/apidom-datamodel": "4.2.0",
65
+ "@speclynx/apidom-json-pointer": "4.2.0",
66
+ "@speclynx/apidom-ns-json-schema-2020-12": "4.2.0",
67
+ "@speclynx/apidom-ns-openapi-3-0": "4.2.0",
68
+ "@speclynx/apidom-traverse": "4.2.0",
69
69
  "ramda": "~0.32.0",
70
70
  "ramda-adjunct": "^6.0.0",
71
71
  "ts-mixer": "^6.0.4"
@@ -80,5 +80,5 @@
80
80
  "README.md",
81
81
  "CHANGELOG.md"
82
82
  ],
83
- "gitHead": "41d4a41ac6157808b01e08d271019e53c4c8d6c5"
83
+ "gitHead": "3485d180340f2d4fad149bcf062a6f618030ca9b"
84
84
  }
@@ -45,7 +45,7 @@ const plugin = ({
45
45
  HeaderElement: {
46
46
  leave(path) {
47
47
  const headerElement = path.node;
48
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
48
+ const ancestors = path.getAncestorNodes(); // parent to root order
49
49
 
50
50
  // skip visiting this Header Object
51
51
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -39,7 +39,7 @@ const plugin = ({
39
39
  HeaderElement: {
40
40
  leave(path) {
41
41
  const headerElement = path.node;
42
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
42
+ const ancestors = path.getAncestorNodes(); // parent to root order
43
43
 
44
44
  // skip visiting this Header Object
45
45
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -45,7 +45,7 @@ const plugin = ({
45
45
  ParameterElement: {
46
46
  leave(path) {
47
47
  const parameterElement = path.node;
48
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
48
+ const ancestors = path.getAncestorNodes(); // parent to root order
49
49
 
50
50
  // skip visiting this Parameter Object
51
51
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -39,7 +39,7 @@ const plugin = ({
39
39
  ParameterElement: {
40
40
  leave(path) {
41
41
  const parameterElement = path.node;
42
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
42
+ const ancestors = path.getAncestorNodes(); // parent to root order
43
43
 
44
44
  // skip visiting this Parameter Object
45
45
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -62,7 +62,7 @@ const plugin = ({
62
62
  OperationElement: {
63
63
  leave(path) {
64
64
  const operationElement = path.node;
65
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
65
+ const ancestors = path.getAncestorNodes(); // parent to root order
66
66
 
67
67
  // skip visiting this Operation
68
68
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -56,7 +56,7 @@ const plugin = ({
56
56
  OperationElement: {
57
57
  leave(path) {
58
58
  const operationElement = path.node;
59
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
59
+ const ancestors = path.getAncestorNodes(); // parent to root order
60
60
 
61
61
  // skip visiting this Operation
62
62
  if (ancestors.some(predicates.isComponentsElement)) {
@@ -102,7 +102,7 @@ const plugin = ({
102
102
  },
103
103
  PathItemElement(path) {
104
104
  const pathItemElement = path.node;
105
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
105
+ const ancestors = path.getAncestorNodes(); // parent to root order
106
106
 
107
107
  // skip visiting this Path Item
108
108
  if (ancestors.some(predicates.isComponentsElement)) return;
@@ -121,7 +121,7 @@ const plugin = ({
121
121
  },
122
122
  OperationElement(path) {
123
123
  const operationElement = path.node;
124
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
124
+ const ancestors = path.getAncestorNodes(); // parent to root order
125
125
 
126
126
  // skip visiting this Operation
127
127
  if (ancestors.some(predicates.isComponentsElement)) return;
@@ -132,7 +132,7 @@ const plugin = ({
132
132
  if (storage.includes(operationJSONPointer)) {
133
133
  return;
134
134
  }
135
- const parentPathItemElement = ancestors.findLast(predicates.isPathItemElement);
135
+ const parentPathItemElement = ancestors.find(predicates.isPathItemElement);
136
136
  if (predicates.isPathItemElement(parentPathItemElement)) {
137
137
  inheritServersToOperation(operationElement, parentPathItemElement);
138
138
  storage.append(operationJSONPointer);
@@ -96,7 +96,7 @@ const plugin = ({
96
96
  },
97
97
  PathItemElement(path) {
98
98
  const pathItemElement = path.node;
99
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
99
+ const ancestors = path.getAncestorNodes(); // parent to root order
100
100
 
101
101
  // skip visiting this Path Item
102
102
  if (ancestors.some(predicates.isComponentsElement)) return;
@@ -115,7 +115,7 @@ const plugin = ({
115
115
  },
116
116
  OperationElement(path) {
117
117
  const operationElement = path.node;
118
- const ancestors = path.getAncestorNodes().reverse(); // root to parent order
118
+ const ancestors = path.getAncestorNodes(); // parent to root order
119
119
 
120
120
  // skip visiting this Operation
121
121
  if (ancestors.some(predicates.isComponentsElement)) return;
@@ -126,7 +126,7 @@ const plugin = ({
126
126
  if (storage.includes(operationJSONPointer)) {
127
127
  return;
128
128
  }
129
- const parentPathItemElement = ancestors.findLast(predicates.isPathItemElement);
129
+ const parentPathItemElement = ancestors.find(predicates.isPathItemElement);
130
130
  if (predicates.isPathItemElement(parentPathItemElement)) {
131
131
  inheritServersToOperation(operationElement, parentPathItemElement);
132
132
  storage.append(operationJSONPointer);