generator
generator copied to clipboard
Resolve and combine allOf before rendering
Reason/Context
Please try answering few of those questions
- Why we need this improvement?
- How will this change help?
- What is the motivation?
With the current HTML template, all of the "combination" keywords are rendered as-in instead of being resolved before rendering. My schemas heavily use references to avoid duplication; allOf
is used everywhere. When my schema is rendered with asyncapi/generator
, I end up with output like this:
Just a bunch of internal composition structure and no substance of the actual schema. (Of course, if you dig down deep enough you eventually get to the schema properties...)
For comparison with a similar tool, ReDoc (for OpenAPI) automatically resolves the allOf
composition and only renders the final schema. And for oneOf
it provides a nice toggle switch:
Description
Please try answering few of those questions
- What changes have to be introduced?
- Will this be a breaking change?
- How could it be implemented/designed?
I'm not sure how ReDoc does it, but any composition keywords would need to be processed and essentially inline/merge the schemas before rendering. It would be a breaking change unless we could put it behind an optional CLI flag.
Welcome to AsyncAPI. Thanks a lot for reporting your first issue. Please check out our contributors guide and the instructions about a basic recommended setup useful for opening a pull request.
Keep in mind there are also other channels you can use to interact with AsyncAPI community. For more details check out this issue.
This issue has been automatically marked as stale because it has not had recent activity :sleeping:
It will be closed in 120 days if no further activity occurs. To unstale this issue, add a comment with a detailed explanation.
There can be many reasons why some specific issue has no activity. The most probable cause is lack of time, not lack of interest. AsyncAPI Initiative is a Linux Foundation project not owned by a single for-profit company. It is a community-driven initiative ruled under open governance model.
Let us figure out together how to push this issue forward. Connect with us through one of many communication channels we established here.
Thank you for your patience :heart:
Should have been posted in the asyncapi/asyncapi-react
repo.