🎄 Happy Holidays! 🥳
Most of Solace is closed December 24–January 1 so our employees can spend time with their families. We will re-open Thursday, January 2, 2024. Please expect slower response times during this period and open a support ticket for anything needing immediate assistance.
Happy Holidays!
Please note: most of Solace is closed December 25–January 2, and will re-open Tuesday, January 3, 2023.
Schema Reference - AsyncAPI Export
Hi,
I have defined a common schema with "CloudEvent" headers that I need to reference in some other Event schemas. This other events have been added to an EventAPI.
When I export the EventAPI to AsyncAPI Spec, this referenced schema is not being included in the definition.
I´ve searching for schema reference examples in the forum, but I could not find any.
This is my config:
- Refereced Schema:
- Previous Schema Reference in the final event:
- Async API Export with missing referenced schema
How can I reference the schema so it´s included in the final spec?
What am I doing wrong?
Thanks in advance.
Mikel
Comments
-
Hi @MikeMdr,
Let me start by saying that Event Portal supports schemas referencing other schemas. The schema references functionality in Event Portal is not schema content aware though. This means that you have to explicitly add the child schemas that are referenced in the content of a parent schema. Event Portal does not parse the schema contents to do that for the user. You can do that when editing the schema. See the screenshot below of where you do this when editing a schema.
Now, on to your main question… "When I export the EventAPI to AsyncAPI Spec, this referenced schema is not being included in the definition."
That is correct. Currently, exported AsyncAPI specs for apps or Event APIs defined Event Portal do not include all of the nested referenced schemas if there are any…even if you explicitly reference them as per above.
We are actually working on addressing this limitation right now. That is, we are enhancing AsyncAPI exports such that all of the nested referenced schemas included in an application or Event API definition will indeed be included in the associated AsyncAPI specs exported for those apps or Event APIs. Just as you would expect. We expect this enhancement to be available in January, maybe even a bit before.
Best regards,
Darryl
0 -
Thank you very much for taking a look Darryl. That enhancement would be great. I´m also missing another piece in the Portal regarding AsyncAPI, a definition render/playground. Something like the right side of this:
. Is that enhancement on the RoadMap? I would be a great feature to have. Thanks in advance.0 -
Hi @MikeMdr, This is feature is not currently on the Event Portal roadmap, but I can see the usefulness of it, and I will add it to the list of ideas for enhancements we have for EP. Most users just copy/paste the AsyncAPI content into AsyncAPI Studio to render it nicely, but that indeed would be convenient straight from the Event Portal UI.
0