@speclynx/apidom-reference 4.14.0 → 4.15.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 CHANGED
@@ -3,6 +3,12 @@
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.15.0](https://github.com/speclynx/apidom/compare/v4.14.0...v4.15.0) (2026-06-24)
7
+
8
+ ### Features
9
+
10
+ - **reference:** add Arazzo 1 bundle strategy ([#367](https://github.com/speclynx/apidom/issues/367)) ([c2bbf7f](https://github.com/speclynx/apidom/commit/c2bbf7f27214839d7288c6439ec482e4094756a3))
11
+
6
12
  # [4.14.0](https://github.com/speclynx/apidom/compare/v4.13.0...v4.14.0) (2026-06-23)
7
13
 
8
14
  ### Features
package/README.md CHANGED
@@ -2925,6 +2925,59 @@ await bundle('/home/user/oas.json', {
2925
2925
  Hoisted components and embedded schema resources are annotated with a `ref-origin` meta field pointing at
2926
2926
  their source document. The bundling process is **immutable** by default (`bundle.immutable: true`).
2927
2927
 
2928
+ ##### [arazzo-1](https://github.com/speclynx/apidom/tree/main/packages/apidom-reference/src/bundle/strategies/arazzo-1)
2929
+
2930
+ Bundle strategy for bundling [Arazzo 1.x](https://spec.openapis.org/arazzo/latest.html) definitions.
2931
+
2932
+ The only external references Arazzo defines are **JSON Schema Objects** — a
2933
+ [JSON Schema 2020-12](https://json-schema.org/draft/2020-12) dialect used by Input Objects and inline schemas.
2934
+ (Reusable Objects are internal-only runtime-expression references, and Source Descriptions point at whole
2935
+ external documents that are intentionally kept external — neither is bundled.) Schema Objects are therefore
2936
+ bundled per the [JSON Schema Compound Document](https://json-schema.org/blog/posts/bundling-json-schema-compound-documents)
2937
+ rules, exactly as in the `openapi-3-1` strategy: the external schema **resource** is embedded verbatim into
2938
+ `components.inputs` carrying its `$id` (one is assigned from the retrieval URI when absent), and the referencing
2939
+ `$ref` is left **unchanged** — it keeps resolving against the embedded resource's `$id`. The whole external
2940
+ resource is embedded once, keyed by its `$id`; references (including `$anchor`, `$dynamicRef`, and
2941
+ `$dynamicAnchor`) are never rewritten. Nested external schema resources are embedded flat into the top-level
2942
+ `components.inputs`, deduplicated by resource URI. Internal Schema Object references are preserved untouched.
2943
+
2944
+ Supported media types:
2945
+
2946
+ ```js
2947
+ [
2948
+ 'application/vnd.oai.workflows;version=1.0.0',
2949
+ 'application/vnd.oai.workflows+json;version=1.0.0',
2950
+ 'application/vnd.oai.workflows+yaml;version=1.0.0',
2951
+ 'application/vnd.oai.workflows;version=1.0.1',
2952
+ 'application/vnd.oai.workflows+json;version=1.0.1',
2953
+ 'application/vnd.oai.workflows+yaml;version=1.0.1'
2954
+ ]
2955
+ ```
2956
+
2957
+ This strategy's behavior is controlled by the same `bundle` options as the `openapi-3-1` strategy
2958
+ (`componentNamesStrategy`, `onComponentNameCollision`, `immutable`, `maxDepth`, `continueOnError`, `refSet`),
2959
+ documented above. Per-strategy overrides use the `arazzo-1` key in `bundle.strategyOpts`:
2960
+
2961
+ ```js
2962
+ import { bundle } from '@speclynx/apidom-reference';
2963
+
2964
+ await bundle('/home/user/arazzo.json', {
2965
+ parse: {
2966
+ mediaType: 'application/vnd.oai.workflows+json;version=1.0.1',
2967
+ },
2968
+ bundle: {
2969
+ strategyOpts: {
2970
+ 'arazzo-1': {
2971
+ onComponentNameCollision: 'error',
2972
+ },
2973
+ },
2974
+ },
2975
+ });
2976
+ ```
2977
+
2978
+ Embedded schema resources are annotated with a `ref-origin` meta field pointing at their source document.
2979
+ The bundling process is **immutable** by default (`bundle.immutable: true`).
2980
+
2928
2981
  ##### Bundle strategies execution order
2929
2982
 
2930
2983
  It's important to understand that default bundle strategies are run in specific order. The order is determined
@@ -2940,6 +2993,7 @@ returns `true` or until entire list of strategies is exhausted (throws error).
2940
2993
  new OpenAPI2BundleStrategy(),
2941
2994
  new OpenAPI3_0BundleStrategy(),
2942
2995
  new OpenAPI3_1BundleStrategy(),
2996
+ new Arazzo1BundleStrategy(),
2943
2997
  ]
2944
2998
  ```
2945
2999
  Most specific strategies are listed first, most generic are listed last.