-
-
Notifications
You must be signed in to change notification settings - Fork 16
Description
Why do we need this improvement?
Despite being called bundler
it does dereferencing, which blocks the use of it for schemas with circular references.
json-schema-ref-parser
used under the hood has mutiple options for handling circular refs and even a dedicated bundle
function for actually bundeling.
moreover, further down the asyncapi
stack circular refs are not a problem, e.g. modelina
can handle schemas with circular refs and generate code for those.
How will this change help?
it will unblock the use of bundler
for cases with circular refs and make the tool more close functions-wise to its name.
Screenshots
No response
How could it be implemented/designed?
default behavior can remain the same, and additional option may enable a behavior of really just bundling
also mixed dereference via dereference.circular=ignore can be achieved.
from the first look at the code base it can be a single additional cli arg (e.g. named strategy
) describing the desired behaviours:
- dereference all (default and current behavior)
- dereference circular
- dereference all except circular
- bundle (via using
json-schema-ref-parser
'sbundle
)
no real complexity of the change, but quite some additional value for the tool.
π§ Breaking changes
No
π Have you checked for similar open issues?
- I checked and didn't find a similar issue
π’ Have you read the Contributing Guidelines?
- I have read the Contributing Guidelines
Are you willing to work on this issue?
Yes I am willing to submit a PR!