@speclynx/apidom-reference 2.3.0 → 2.4.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-reference",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.4.0",
|
|
4
4
|
"description": "Advanced algorithms for semantic ApiDOM manipulations like dereferencing or resolution.",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public",
|
|
@@ -213,7 +213,7 @@
|
|
|
213
213
|
"test": "npm run build:es && cross-env BABEL_ENV=es babel test --out-dir test --extensions '.ts' --out-file-extension '.mjs' --root-mode 'upward' && cross-env NODE_ENV=test mocha",
|
|
214
214
|
"perf": "cross-env BABEL_ENV=es babel ./test/perf/index.ts --out-file ./test/perf/index.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/index.mjs",
|
|
215
215
|
"perf:openapi-3-1-dereference": "cross-env BABEL_ENV=es babel ./test/perf/openapi-3-1-dereference.ts --out-file ./test/perf/openapi-3-1-dereference.mjs --root-mode 'upward' && cross-env NODE_ENV=test node ./test/perf/openapi-3-1-dereference.mjs",
|
|
216
|
-
"typescript:check-types": "tsc --noEmit
|
|
216
|
+
"typescript:check-types": "tsc --noEmit",
|
|
217
217
|
"typescript:declaration": "tsc -p tsconfig.declaration.json && api-extractor run -l -c ./config/api-extractor/api-extractor.json",
|
|
218
218
|
"prepack": "copyfiles -u 3 ../../LICENSES/* LICENSES && copyfiles -u 2 ../../NOTICE .",
|
|
219
219
|
"postpack": "rimraf NOTICE LICENSES"
|
|
@@ -226,28 +226,28 @@
|
|
|
226
226
|
"license": "Apache-2.0",
|
|
227
227
|
"dependencies": {
|
|
228
228
|
"@babel/runtime-corejs3": "^7.28.4",
|
|
229
|
-
"@speclynx/apidom-core": "^2.
|
|
230
|
-
"@speclynx/apidom-datamodel": "^2.
|
|
231
|
-
"@speclynx/apidom-error": "^2.
|
|
232
|
-
"@speclynx/apidom-json-pointer": "^2.
|
|
233
|
-
"@speclynx/apidom-ns-arazzo-1": "^2.
|
|
234
|
-
"@speclynx/apidom-ns-asyncapi-2": "^2.
|
|
235
|
-
"@speclynx/apidom-ns-openapi-2": "^2.
|
|
236
|
-
"@speclynx/apidom-ns-openapi-3-0": "^2.
|
|
237
|
-
"@speclynx/apidom-ns-openapi-3-1": "^2.
|
|
238
|
-
"@speclynx/apidom-parser-adapter-arazzo-json-1": "^2.
|
|
239
|
-
"@speclynx/apidom-parser-adapter-arazzo-yaml-1": "^2.
|
|
240
|
-
"@speclynx/apidom-parser-adapter-asyncapi-json-2": "^2.
|
|
241
|
-
"@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "^2.
|
|
242
|
-
"@speclynx/apidom-parser-adapter-json": "^2.
|
|
243
|
-
"@speclynx/apidom-parser-adapter-openapi-json-2": "^2.
|
|
244
|
-
"@speclynx/apidom-parser-adapter-openapi-json-3-0": "^2.
|
|
245
|
-
"@speclynx/apidom-parser-adapter-openapi-json-3-1": "^2.
|
|
246
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-2": "^2.
|
|
247
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "^2.
|
|
248
|
-
"@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "^2.
|
|
249
|
-
"@speclynx/apidom-parser-adapter-yaml-1-2": "^2.
|
|
250
|
-
"@speclynx/apidom-traverse": "^2.
|
|
229
|
+
"@speclynx/apidom-core": "^2.4.0",
|
|
230
|
+
"@speclynx/apidom-datamodel": "^2.4.0",
|
|
231
|
+
"@speclynx/apidom-error": "^2.4.0",
|
|
232
|
+
"@speclynx/apidom-json-pointer": "^2.4.0",
|
|
233
|
+
"@speclynx/apidom-ns-arazzo-1": "^2.4.0",
|
|
234
|
+
"@speclynx/apidom-ns-asyncapi-2": "^2.4.0",
|
|
235
|
+
"@speclynx/apidom-ns-openapi-2": "^2.4.0",
|
|
236
|
+
"@speclynx/apidom-ns-openapi-3-0": "^2.4.0",
|
|
237
|
+
"@speclynx/apidom-ns-openapi-3-1": "^2.4.0",
|
|
238
|
+
"@speclynx/apidom-parser-adapter-arazzo-json-1": "^2.4.0",
|
|
239
|
+
"@speclynx/apidom-parser-adapter-arazzo-yaml-1": "^2.4.0",
|
|
240
|
+
"@speclynx/apidom-parser-adapter-asyncapi-json-2": "^2.4.0",
|
|
241
|
+
"@speclynx/apidom-parser-adapter-asyncapi-yaml-2": "^2.4.0",
|
|
242
|
+
"@speclynx/apidom-parser-adapter-json": "^2.4.0",
|
|
243
|
+
"@speclynx/apidom-parser-adapter-openapi-json-2": "^2.4.0",
|
|
244
|
+
"@speclynx/apidom-parser-adapter-openapi-json-3-0": "^2.4.0",
|
|
245
|
+
"@speclynx/apidom-parser-adapter-openapi-json-3-1": "^2.4.0",
|
|
246
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-2": "^2.4.0",
|
|
247
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-3-0": "^2.4.0",
|
|
248
|
+
"@speclynx/apidom-parser-adapter-openapi-yaml-3-1": "^2.4.0",
|
|
249
|
+
"@speclynx/apidom-parser-adapter-yaml-1-2": "^2.4.0",
|
|
250
|
+
"@speclynx/apidom-traverse": "^2.4.0",
|
|
251
251
|
"axios": "^1.13.0",
|
|
252
252
|
"minimatch": "^7.4.6",
|
|
253
253
|
"process": "^0.11.10",
|
|
@@ -267,5 +267,5 @@
|
|
|
267
267
|
"README.md",
|
|
268
268
|
"CHANGELOG.md"
|
|
269
269
|
],
|
|
270
|
-
"gitHead": "
|
|
270
|
+
"gitHead": "f127ee0b98cc108b83a690bf317895e17a32b4d4"
|
|
271
271
|
}
|
|
@@ -243,11 +243,14 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
243
243
|
|
|
244
244
|
// override description and summary (outer has higher priority then inner)
|
|
245
245
|
if ((0, _apidomDatamodel.isObjectElement)(referencedElement) && (0, _apidomDatamodel.isObjectElement)(mergedElement)) {
|
|
246
|
-
|
|
246
|
+
const fields = (0, _apidomCore.fixedFields)(referencedElement, {
|
|
247
|
+
indexed: true
|
|
248
|
+
});
|
|
249
|
+
if (referencingElement.hasKey('description') && Object.hasOwn(fields, 'description')) {
|
|
247
250
|
mergedElement.remove('description');
|
|
248
251
|
mergedElement.set('description', referencingElement.get('description'));
|
|
249
252
|
}
|
|
250
|
-
if (referencingElement.hasKey('summary') && 'summary'
|
|
253
|
+
if (referencingElement.hasKey('summary') && Object.hasOwn(fields, 'summary')) {
|
|
251
254
|
mergedElement.remove('summary');
|
|
252
255
|
mergedElement.set('summary', referencingElement.get('summary'));
|
|
253
256
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { propEq, none } from 'ramda';
|
|
2
2
|
import { isUndefined } from 'ramda-adjunct';
|
|
3
3
|
import { isElement, isPrimitiveElement, isStringElement, isObjectElement, RefElement, cloneShallow, cloneDeep } from '@speclynx/apidom-datamodel';
|
|
4
|
-
import { IdentityManager, toValue } from '@speclynx/apidom-core';
|
|
4
|
+
import { IdentityManager, toValue, fixedFields } from '@speclynx/apidom-core';
|
|
5
5
|
import { ApiDOMError } from '@speclynx/apidom-error';
|
|
6
6
|
import { traverseAsync, find } from '@speclynx/apidom-traverse';
|
|
7
7
|
import { evaluate as jsonPointerEvaluate, URIFragmentIdentifier } from '@speclynx/apidom-json-pointer';
|
|
@@ -237,11 +237,14 @@ class OpenAPI3_1DereferenceVisitor {
|
|
|
237
237
|
|
|
238
238
|
// override description and summary (outer has higher priority then inner)
|
|
239
239
|
if (isObjectElement(referencedElement) && isObjectElement(mergedElement)) {
|
|
240
|
-
|
|
240
|
+
const fields = fixedFields(referencedElement, {
|
|
241
|
+
indexed: true
|
|
242
|
+
});
|
|
243
|
+
if (referencingElement.hasKey('description') && Object.hasOwn(fields, 'description')) {
|
|
241
244
|
mergedElement.remove('description');
|
|
242
245
|
mergedElement.set('description', referencingElement.get('description'));
|
|
243
246
|
}
|
|
244
|
-
if (referencingElement.hasKey('summary') && 'summary'
|
|
247
|
+
if (referencingElement.hasKey('summary') && Object.hasOwn(fields, 'summary')) {
|
|
245
248
|
mergedElement.remove('summary');
|
|
246
249
|
mergedElement.set('summary', referencingElement.get('summary'));
|
|
247
250
|
}
|