-
Notifications
You must be signed in to change notification settings - Fork 304
Closed
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is needed and we are accepting pull requests from anyone willing to take this on.Extra attention is needed and we are accepting pull requests from anyone willing to take this on.
Description
Carried over from #154
Is your feature request related to a problem?
Currently there is no support for handling discriminators. Moreover, discriminator $ref pointers don't adhere to JSON Schema specification and are thus not resolved by our parser/resolver. This means we will need to resolve discriminator $ref pointers on-demand.
Describe the solution you'd like
- Implement support for discriminators.
- Render schema mappings at the same level as the property we're applying the discriminator to (may necessitate a new UI component or setting the
marginLeftto "-2.4rem") - Leverage the
OpenAPIParserclassbyRef()method to resolve $ref pointers. (Will require instantiating and passing aparserinstance for each spec we read in)
Describe alternatives you've considered
Explored using oneOf in place of discriminator but it renders the schema as a child of the property which does not satisfy the requirements.
Additional context
ReDocly has a group write up on this and their ReDoc demo demonstrates the correct implementation: https://redocly.com/docs/resources/discriminator/
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or requesthelp wantedExtra attention is needed and we are accepting pull requests from anyone willing to take this on.Extra attention is needed and we are accepting pull requests from anyone willing to take this on.