-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Sub category does not appear in Demo spec #196
Comments
The gif was taken from modified locally petstore spec. It is not committed to demo. |
So what is necessary to create the subcategory fields? SwaggerUI for example interprets on the first operation a body parameter and produces a text area. Is some extra parameter required to do the same for ReDoc? |
In ReDoc we try to document request and response payloads as much as possible. So when SwaggerUI just renders a text area we render payload recursively with all the metadata. Payload is generated based on SchemaObject from OpenAPI spec which is limited version of JsonSchema Draft 4 Subproperties in JSON Schema are documented with Category:
type: object
properties:
subcategory:
type: object # <- set type of field to object
properties: # <- here we document subproperties
name:
type: string
id:
description: Category ID
type: string
name:
description: Category name
type: string
minLength: 1 I will update demo spec in the upcoming release. |
Thanks @RomanGotsiy I have that working now. I guess I misunderstood the tool slightly and I was expecting to be able to make real requests to the API as SwaggerUI does. My bad! |
@kevprice83 np. btw ReDoc will have possibility to make real requests. This feature is called API Console and we will start working on it soon. you can track it in the issue #53 or by subscribing to my twitter @RomanHotsiy |
I'm just testing this tool and so far it ticks all the boxes. I noticed that the sub category does not render in the demo here. The animated GIF shows the ability to open a sub category and enter the necessary parameters. I am testing with the sample petstore spec on my site and the same issue occurs.
Am I missing something very obvious or is there a dependency I'm not including?
I'm referencing the library via CDN.
The text was updated successfully, but these errors were encountered: