AsyncAPI document bundler #77
Replies: 4 comments 6 replies
-
Actually this is related to the Single Schema Dictionary Definitions Management Tool for Multiple AsyncAPI Definitions and this could relate to a remote data dictionary definition |
Beta Was this translation helpful? Give feedback.
-
Love this idea @magicmatatjahu, think it is very powerful. I guess |
Beta Was this translation helpful? Give feedback.
-
this proposal is really useful. For example if you want to paste your spec into browser-based tools to validate them or experiment (such as async api playground). Or any other tool without access to the |
Beta Was this translation helpful? Give feedback.
-
Some people in the community have asked if we know of a tool that would bundle all references from an single AsyncAPI document into a single file - similar to https://github.com/APIDevTools/json-schema-ref-parser/blob/main/docs/ref-parser.md#bundleschema-options-callback
In short, if you have an AsyncAPI file with references to local files/external sources like web pages etc, you need to bundle these references (or more precisely, their values) into a single AsyncAPI file under
components/*
paths. Also, the resulting AsyncAPI document should be small, since it should still contain internal JSON references rather than being fully-dereferenced.Some example:
and then after bundling we should have single file like:
Note that things that are not part of the specification but are referenced, such as extensions, should be referenced from
x-components
or some other section.If possible, use the source code from https://github.com/APIDevTools/json-schema-ref-parser package
The idea can be implemented as separate package and in future we can introduce it in
parser-js
underbundle
function.Beta Was this translation helpful? Give feedback.
All reactions