Skip to content
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

Render the detailed structure of the objects of the arguments #6364

Closed
Ninroot opened this issue Sep 8, 2020 · 1 comment
Closed

Render the detailed structure of the objects of the arguments #6364

Ninroot opened this issue Sep 8, 2020 · 1 comment

Comments

@Ninroot
Copy link

Ninroot commented Sep 8, 2020

Content & configuration

Swagger/OpenAPI definition:

---
openapi: 3.0.2
info:
 title: API for role test
 description: API for role test
 version: 0.1.0
paths:
 /tasks/test:
   post:
     requestBody:
       description: Using requestbody allows swagger ui to display the details of required parameters
       required: true
       content:
         application/json:
           schema:
             type: array
             items:
               type: object
               properties:
                 id:
                   type: number
                 name:
                   type: string
                 state:
                   type: string
                   enum: [enum1, enum2, enum3]
     responses:
         '201':
           description: Created
   get:
     description: Using header, path, query or cookie to render the details of required parameters is not supported by swagger ui yet
     parameters:
       - in: header  # Do not touch this var, please
         name: param01
         schema:
           type: array
           items:
             type: object
             properties:
               id:
                 type: number
               name:
                 type: string
               state:
                 type: string
                 enum: [enum1, enum2, enum3]
         required: true
     responses:
       '200':
         description: "ok"
       '500':
         description: "error"

Test on https://editor.swagger.io/

Is your feature request related to a problem?

Header, path, query and cookie parameters do not render the details of the arguments.

Describe the solution you'd like

Render the arguments object details the same way as in a requestbody

Additional context

image
image

Redoc always previews details of objects, that's nice! Let's have that also for swagger ui rendering.

Screen Shot 2020-09-08 at 10 20 48 AM

@hkosova
Copy link
Contributor

hkosova commented Sep 8, 2020

Hi @Ninroot, this is tracked in #4581 so I'll close this one as a duplicate.

@hkosova hkosova closed this as completed Sep 8, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants