@speclynx/apidom-reference 5.1.1 → 5.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 +16 -0
- package/README.md +44 -2
- package/dist/apidom-reference.browser.js +2095 -777
- package/dist/apidom-reference.browser.min.js +1 -1
- package/package.json +31 -31
- package/src/bundle/strategies/arazzo-1/visitor.cjs +24 -8
- package/src/bundle/strategies/arazzo-1/visitor.mjs +25 -9
- package/src/dereference/strategies/arazzo-1/index.cjs +12 -0
- package/src/dereference/strategies/arazzo-1/index.mjs +1 -1
- package/src/dereference/strategies/arazzo-1/source-descriptions.cjs +43 -41
- package/src/dereference/strategies/arazzo-1/source-descriptions.mjs +43 -41
- package/src/dereference/strategies/arazzo-1/util.cjs +86 -1
- package/src/dereference/strategies/arazzo-1/util.mjs +81 -2
- package/src/dereference/strategies/arazzo-1/visitor.cjs +21 -7
- package/src/dereference/strategies/arazzo-1/visitor.mjs +22 -8
- package/src/parse/parsers/arazzo-json-1/source-descriptions.cjs +39 -38
- package/src/parse/parsers/arazzo-json-1/source-descriptions.mjs +40 -39
- package/types/bundle/strategies/arazzo-1/visitor.d.ts +6 -0
- package/types/dereference/strategies/arazzo-1/index.d.ts +1 -1
- package/types/dereference/strategies/arazzo-1/source-descriptions.d.ts +7 -0
- package/types/dereference/strategies/arazzo-1/util.d.ts +34 -1
- package/types/dereference/strategies/arazzo-1/visitor.d.ts +6 -0
- package/types/parse/parsers/arazzo-json-1/source-descriptions.d.ts +7 -0
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,22 @@
|
|
|
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
|
+
## [5.2.2](https://github.com/speclynx/apidom/compare/v5.2.1...v5.2.2) (2026-09-03)
|
|
7
|
+
|
|
8
|
+
### Bug Fixes
|
|
9
|
+
|
|
10
|
+
- **reference:** distinguish shared source descriptions from cycles ([#518](https://github.com/speclynx/apidom/issues/518)) ([b66bac4](https://github.com/speclynx/apidom/commit/b66bac4f5f8f91f5cc1010fb8dd12aed399d5dfa)), closes [usearazzo/arazzo-toolkit#139](https://github.com/usearazzo/arazzo-toolkit/issues/139)
|
|
11
|
+
|
|
12
|
+
## [5.2.1](https://github.com/speclynx/apidom/compare/v5.2.0...v5.2.1) (2026-08-29)
|
|
13
|
+
|
|
14
|
+
**Note:** Version bump only for package @speclynx/apidom-reference
|
|
15
|
+
|
|
16
|
+
# [5.2.0](https://github.com/speclynx/apidom/compare/v5.1.1...v5.2.0) (2026-08-29)
|
|
17
|
+
|
|
18
|
+
### Features
|
|
19
|
+
|
|
20
|
+
- **reference:** add support for Arazzo 1.1.0 ([#504](https://github.com/speclynx/apidom/issues/504)) ([1bad06a](https://github.com/speclynx/apidom/commit/1bad06a2a4a7ea7ef57223d4d08a8f60d17eddf2)), closes [#297](https://github.com/speclynx/apidom/issues/297)
|
|
21
|
+
|
|
6
22
|
## [5.1.1](https://github.com/speclynx/apidom/compare/v5.1.0...v5.1.1) (2026-08-19)
|
|
7
23
|
|
|
8
24
|
**Note:** Version bump only for package @speclynx/apidom-reference
|
package/README.md
CHANGED
|
@@ -289,6 +289,8 @@ Supported media types are:
|
|
|
289
289
|
'application/vnd.oai.workflows+json;version=1.0.0',
|
|
290
290
|
'application/vnd.oai.workflows;version=1.0.1',
|
|
291
291
|
'application/vnd.oai.workflows+json;version=1.0.1',
|
|
292
|
+
'application/vnd.oai.workflows;version=1.1.0',
|
|
293
|
+
'application/vnd.oai.workflows+json;version=1.1.0',
|
|
292
294
|
]
|
|
293
295
|
```
|
|
294
296
|
|
|
@@ -303,9 +305,16 @@ Parser-specific options take precedence over global options.
|
|
|
303
305
|
|
|
304
306
|
Each parsed source description is added with a `'source-description'` class and metadata (`name`, `type`, `retrievalURI`).
|
|
305
307
|
Only OpenAPI 2.0, OpenAPI 3.0.x, OpenAPI 3.1.x, and Arazzo 1.x documents are accepted as source descriptions.
|
|
308
|
+
Source description URLs are resolved against the Arazzo document's base URI (its `$self` field when present, otherwise its retrieval URI).
|
|
306
309
|
- **sourceDescriptionsMaxDepth** - Maximum recursion depth for parsing nested Arazzo source descriptions.
|
|
307
310
|
Defaults to `+Infinity`. Circular references are automatically detected and skipped.
|
|
308
311
|
|
|
312
|
+
A document referenced from more than one place (e.g., one OpenAPI description shared by several Arazzo documents)
|
|
313
|
+
is parsed only once. Every later source description referencing it gets its own `ParseResultElement` with the usual
|
|
314
|
+
metadata, an `'info'` annotation, and a `'parseResult'` meta pointing at the `ParseResultElement` where the document was parsed.
|
|
315
|
+
The `SourceDescriptionElement`'s `'parseResult'` meta points at that same `ParseResultElement`, so the parsed
|
|
316
|
+
document is reachable from every source description that references it.
|
|
317
|
+
|
|
309
318
|
##### Error handling
|
|
310
319
|
|
|
311
320
|
The source descriptions parsing uses annotations instead of throwing errors, allowing parsing to continue
|
|
@@ -442,6 +451,8 @@ Supported media types are:
|
|
|
442
451
|
'application/vnd.oai.workflows+yaml;version=1.0.0',
|
|
443
452
|
'application/vnd.oai.workflows;version=1.0.1',
|
|
444
453
|
'application/vnd.oai.workflows+yaml;version=1.0.1',
|
|
454
|
+
'application/vnd.oai.workflows;version=1.1.0',
|
|
455
|
+
'application/vnd.oai.workflows+yaml;version=1.1.0',
|
|
445
456
|
]
|
|
446
457
|
```
|
|
447
458
|
|
|
@@ -456,9 +467,16 @@ Parser-specific options take precedence over global options. See [arazzo-json-1]
|
|
|
456
467
|
|
|
457
468
|
Each parsed source description is added with a `'source-description'` class and metadata (`name`, `type`, `retrievalURI`).
|
|
458
469
|
Only OpenAPI 2.0, OpenAPI 3.0.x, OpenAPI 3.1.x, and Arazzo 1.x documents are accepted as source descriptions.
|
|
470
|
+
Source description URLs are resolved against the Arazzo document's base URI (its `$self` field when present, otherwise its retrieval URI).
|
|
459
471
|
- **sourceDescriptionsMaxDepth** - Maximum recursion depth for parsing nested Arazzo source descriptions.
|
|
460
472
|
Defaults to `+Infinity`. Circular references are automatically detected and skipped.
|
|
461
473
|
|
|
474
|
+
A document referenced from more than one place (e.g., one OpenAPI description shared by several Arazzo documents)
|
|
475
|
+
is parsed only once. Every later source description referencing it gets its own `ParseResultElement` with the usual
|
|
476
|
+
metadata, an `'info'` annotation, and a `'parseResult'` meta pointing at the `ParseResultElement` where the document was parsed.
|
|
477
|
+
The `SourceDescriptionElement`'s `'parseResult'` meta points at that same `ParseResultElement`, so the parsed
|
|
478
|
+
document is reachable from every source description that references it.
|
|
479
|
+
|
|
462
480
|
##### Error handling
|
|
463
481
|
|
|
464
482
|
See [arazzo-json-1 Error handling](#error-handling) - the behavior is identical for both JSON and YAML parsers.
|
|
@@ -1607,6 +1625,9 @@ Supported media types:
|
|
|
1607
1625
|
'application/vnd.oai.workflows;version=1.0.1',
|
|
1608
1626
|
'application/vnd.oai.workflows+json;version=1.0.1',
|
|
1609
1627
|
'application/vnd.oai.workflows+yaml;version=1.0.1',
|
|
1628
|
+
'application/vnd.oai.workflows;version=1.1.0',
|
|
1629
|
+
'application/vnd.oai.workflows+json;version=1.1.0',
|
|
1630
|
+
'application/vnd.oai.workflows+yaml;version=1.1.0',
|
|
1610
1631
|
]
|
|
1611
1632
|
```
|
|
1612
1633
|
|
|
@@ -2008,6 +2029,11 @@ Supported media types:
|
|
|
2008
2029
|
|
|
2009
2030
|
Dereference strategy for dereferencing [Arazzo 1.x](https://spec.openapis.org/arazzo/latest.html) definitions.
|
|
2010
2031
|
|
|
2032
|
+
Relative references (JSON Schema `$ref` keywords and Source Description URLs) are resolved against the document's
|
|
2033
|
+
base URI. Per Arazzo 1.1.0, the base URI is the Arazzo Object's `$self` field when present (itself resolved
|
|
2034
|
+
against the retrieval URI when relative), otherwise the retrieval URI. A reference whose URI matches the `$self`
|
|
2035
|
+
of an already loaded Arazzo document resolves to that document by identity, without fetching it again.
|
|
2036
|
+
|
|
2011
2037
|
Supported media types:
|
|
2012
2038
|
|
|
2013
2039
|
```js
|
|
@@ -2018,6 +2044,9 @@ Supported media types:
|
|
|
2018
2044
|
'application/vnd.oai.workflows;version=1.0.1',
|
|
2019
2045
|
'application/vnd.oai.workflows+json;version=1.0.1',
|
|
2020
2046
|
'application/vnd.oai.workflows+yaml;version=1.0.1',
|
|
2047
|
+
'application/vnd.oai.workflows;version=1.1.0',
|
|
2048
|
+
'application/vnd.oai.workflows+json;version=1.1.0',
|
|
2049
|
+
'application/vnd.oai.workflows+yaml;version=1.1.0',
|
|
2021
2050
|
]
|
|
2022
2051
|
```
|
|
2023
2052
|
|
|
@@ -2032,9 +2061,16 @@ Strategy-specific options take precedence over global options.
|
|
|
2032
2061
|
|
|
2033
2062
|
Each dereferenced source description is added with a `'source-description'` class and metadata (`name`, `type`, `retrievalURI`).
|
|
2034
2063
|
Only OpenAPI 2.0, OpenAPI 3.0.x, OpenAPI 3.1.x, and Arazzo 1.x documents are accepted as source descriptions.
|
|
2064
|
+
Source description URLs are resolved against the Arazzo document's base URI (its `$self` field when present, otherwise its retrieval URI).
|
|
2035
2065
|
- **sourceDescriptionsMaxDepth** - Maximum recursion depth for dereferencing nested Arazzo source descriptions.
|
|
2036
2066
|
Defaults to `+Infinity`. Circular references are automatically detected and skipped.
|
|
2037
2067
|
|
|
2068
|
+
A document referenced from more than one place (e.g., one OpenAPI description shared by several Arazzo documents)
|
|
2069
|
+
is dereferenced only once. Every later source description referencing it gets its own `ParseResultElement` with the usual
|
|
2070
|
+
metadata, an `'info'` annotation, and a `'parseResult'` meta pointing at the `ParseResultElement` where the document was dereferenced.
|
|
2071
|
+
The `SourceDescriptionElement`'s `'parseResult'` meta points at that same `ParseResultElement`, so the dereferenced
|
|
2072
|
+
document is reachable from every source description that references it.
|
|
2073
|
+
|
|
2038
2074
|
###### Error handling
|
|
2039
2075
|
|
|
2040
2076
|
The source descriptions dereferencing uses annotations instead of throwing errors, allowing dereferencing to continue
|
|
@@ -2940,6 +2976,9 @@ rules, exactly as in the `openapi-3-1` strategy: the external schema **resource*
|
|
|
2940
2976
|
resource is embedded once, keyed by its `$id`; references (including `$anchor`, `$dynamicRef`, and
|
|
2941
2977
|
`$dynamicAnchor`) are never rewritten. Nested external schema resources are embedded flat into the top-level
|
|
2942
2978
|
`components.inputs`, deduplicated by resource URI. Internal Schema Object references are preserved untouched.
|
|
2979
|
+
Schema Object `$ref`s are resolved against the document's base URI — the Arazzo Object's `$self` field when
|
|
2980
|
+
present (Arazzo 1.1.0), otherwise the retrieval URI — and references resolving into the entry document
|
|
2981
|
+
(including by its `$self` identity) are treated as internal.
|
|
2943
2982
|
|
|
2944
2983
|
Supported media types:
|
|
2945
2984
|
|
|
@@ -2950,7 +2989,10 @@ Supported media types:
|
|
|
2950
2989
|
'application/vnd.oai.workflows+yaml;version=1.0.0',
|
|
2951
2990
|
'application/vnd.oai.workflows;version=1.0.1',
|
|
2952
2991
|
'application/vnd.oai.workflows+json;version=1.0.1',
|
|
2953
|
-
'application/vnd.oai.workflows+yaml;version=1.0.1'
|
|
2992
|
+
'application/vnd.oai.workflows+yaml;version=1.0.1',
|
|
2993
|
+
'application/vnd.oai.workflows;version=1.1.0',
|
|
2994
|
+
'application/vnd.oai.workflows+json;version=1.1.0',
|
|
2995
|
+
'application/vnd.oai.workflows+yaml;version=1.1.0',
|
|
2954
2996
|
]
|
|
2955
2997
|
```
|
|
2956
2998
|
|
|
@@ -2963,7 +3005,7 @@ import { bundle } from '@speclynx/apidom-reference';
|
|
|
2963
3005
|
|
|
2964
3006
|
await bundle('/home/user/arazzo.json', {
|
|
2965
3007
|
parse: {
|
|
2966
|
-
mediaType: 'application/vnd.oai.workflows+json;version=1.0
|
|
3008
|
+
mediaType: 'application/vnd.oai.workflows+json;version=1.1.0',
|
|
2967
3009
|
},
|
|
2968
3010
|
bundle: {
|
|
2969
3011
|
strategyOpts: {
|