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

Object parameter schemas are not displayed #3558

Closed
shockey opened this issue Aug 11, 2017 · 6 comments
Closed

Object parameter schemas are not displayed #3558

shockey opened this issue Aug 11, 2017 · 6 comments

Comments

@shockey
Copy link
Contributor

shockey commented Aug 11, 2017

Q A
Bug or feature request? Bug
Which Swagger/OpenAPI version? 3.0.0
Which Swagger-UI version? 3.1 series
How did you install Swagger-UI? n/a
Which broswer & version? Chrome
Which operating system? macOS Sierra

First reported here:#3428 (comment)

Demonstration API definition

openapi: 3.0.0
info:
  version: 0.0.0
  title: test

servers:
  - url: http://httpbin.org

paths:
  /anything/foo{params}:
    get:
      parameters:
        - in: path
          name: params
          required: true
          schema:
            type: object
            properties:
              lat:
                type: integer
                example: 50
              long:
                type: integer
                example: 20
              scale:
                type: integer
                example: 32000
          style: matrix
          explode: true
      responses:
        '200':
          description: OK

Expected Behavior

Object parameter schemas should be displayed similar to Request Bodies.

Current Behavior

Object schema is not displayed at all.

Possible Solution

Request Body display component may need to be generalized and reused.

@webron
Copy link
Contributor

webron commented Aug 11, 2017

@shockey it's slightly more than that - parameters also support content, even though only one media type can be used.

@ctruzzi
Copy link

ctruzzi commented Nov 15, 2017

Any update on this? Appears there's no way to currently display complex query objects w/o this part of OAS 3.0.

@webron
Copy link
Contributor

webron commented Nov 15, 2017

@ctruzzi you are correct! PRs are welcome.

@shockey
Copy link
Contributor Author

shockey commented May 22, 2018

This was fixed by #4563 😄

image

@spemmons
Copy link

spemmons commented Jun 5, 2019

would be great to get this going ... is there a known solution that nobody has had time to implement? ... could take a whack at it w/ guidance

@s0meRandomDev
Copy link

This does not work if the schema is given through $ref :

Does not work:

    /table/{tableName}:
      get:
        parameters:
         - in: path
           name: tableName
           required: true
           schema:
             $ref: "/api/v1/conso/schemas/enums/tableNames"

with /api/v1/conso/schemas/enums/tableNames returning:

{
    type: 'string',
    enum: ['hello', 'there'],
    default: 'there'
}

Works:

     /table/{tableName}:
       get:
         parameters:
          - in: path
            name: tableName
            required: true
            schema:
              type: string
              enum: ['hello','there']
              default: 'there'

@lock lock bot locked and limited conversation to collaborators Jun 24, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants