Skip to content
This repository has been archived by the owner on Aug 18, 2023. It is now read-only.

Is there a plan to add models/schemas? #106

Closed
AX-LLaidley opened this issue Aug 4, 2021 · 6 comments
Closed

Is there a plan to add models/schemas? #106

AX-LLaidley opened this issue Aug 4, 2021 · 6 comments

Comments

@AX-LLaidley
Copy link

We have several endpoints in our API that use polymorphism (oneOf/anyOf) that link out to a number of schemas that can be used for endpoints that require varying configuration parameters. I noticed that schemas are not displayed in the developer portal, which poses an issue for us because that information is vital for our customers to be able to effectively use the API.

Is there any plan to add this functionality, similar to what Stoplight and Swagger Editor offer? I noticed an open issue in one of your other repos asking for the same functionality, and was hoping it might be implemented here as well.

If not, would you mind walking me through how we can show/render the schemas on the developer portal so that our customers can readily view that information?

@adamaltman
Copy link
Member

@AX-LLaidley happy to walk you through this. We do have support for polymorphism. Reach out to team at redocly dot com.

@AX-LLaidley
Copy link
Author

@adamaltman I think we actually already resolved this issue, as upgrading to the later versions of the developer portal that included the updates to use Reference Docs 2.x did the trick for us. Now everything is working as it should. 👍🏻🙂

@DavidBiesack
Copy link

Is there a demo or other example of this? https://redocly.github.io/redoc/ does not render a "Schemas" or "Models" section when I try it. Perhaps that is just the open source redoc tool, not the dev portal commercial product? I looked at some of the redoc.ly customer sites and don't see sections for Models. I'm considering redocly but it's crucial that I can link to anchors for the models -- we cite/link to the models that reside inside our API reference doc from other documents.

@AX-LLaidley
Copy link
Author

@DavidBiesack The schemas are shown for responses, as well as for request bodies, as long as they are defined in the API reference doc. I believe this should also be the case for schemas/models that are linked using an external ref.

It looks like on the example, the Models section is created by defining it in the sidebars.yaml with links to the tags in the openapi.yaml.

Also, please bear in mind you are commenting on a closed issue, not to mention current events happening in Ukraine (where much of the Redocly team is based), so the Redocly folks may not respond here, or at least not right away.

🇺🇦 ❤️ #standwithukraine

@adamaltman
Copy link
Member

ukraine heart #standwithukraine

Thank you @AX-LLaidley !

This component can be used to display schemas on pages: https://redoc.ly/docs/developer-portal/components/json-schema/

@RomanHotsiy
Copy link
Member

@DavidBiesack we have this "Models" feature in progress. We never implemented it as we display models inline but we had some requests like yours to be able to link to models externally.

We're working on it. ETA is hopefully ~4-5 weeks from now depending on the situation.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants