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

Schema not rendered for query parameter #7696

Open
FCsongradi opened this issue Dec 8, 2021 · 4 comments
Open

Schema not rendered for query parameter #7696

FCsongradi opened this issue Dec 8, 2021 · 4 comments

Comments

@FCsongradi
Copy link

FCsongradi commented Dec 8, 2021

Q&A (please complete the following information)

  • OS: Linux
  • Browser: chrome
  • Version: latest
  • Swagger-UI version: 3.26.2
  • Swagger/OpenAPI version: OpenAPI 3.0.1

Describe the bug you're encountering

Swagger-UI is not displaying the schema if it's for a parameter from query, but it displays the description.

To reproduce...

Steps to reproduce the behavior:

  1. Load a yaml with a similar operation in Swagger-UI
    ...
    get:
      tags:
        - array query parameter test
      operationId: arrayQueryParamTest
      summary: Testing array in query parameter not rendered issue.
      parameters:
      - name: arrayTest
        in: query
        description: Array parameter in query
        schema:
          type: array
          items:
            type: string
            maxLength: 25
            description: Test item
            example: Example string item
      responses:
        200:
        ...
  2. Open the corresponding operation
  3. See that only parameter description is visible

Actual behavior

Only parameter description is shown without examples or schema

Expected behavior

I expected the schema to be shown in the parameter description.

@callmerockett
Copy link

callmerockett commented Jan 5, 2022

I'm facing exactly this issue. The lack of a detailed schema for objects in parameters gives poor information about enum types (just show the first option, but no more), for example. There are a related issue to this problem #4581, but i'm not sure about the progress.

@FCsongradi
Copy link
Author

Thanks for the reply and for the link. I've checked and there is no solution for this yet. The issue #4581 was created in 2018. Is there any hope that this will be fixed?

@DoZiBo1
Copy link

DoZiBo1 commented Jul 17, 2024

I am also struggling with the issue, that parameters do not inherit description from a schema. Would this be considered the same issue?
I am trying to use schemas for descriptions, but when defining a parameter that refs to a schema, the schema description is not shown as parameter description.

@Eger37
Copy link

Eger37 commented Aug 28, 2024

Hi, I think I have the same problem.
I used https://editor.swagger.io.
A part from my json doc in open API 3.1:
"/dogs": { "get": { "responses": { "200": {... } } }, "parameters": [ { "name": "filter", "in": "query", "required": false, "content": { "application/json": { "schema": { "type": "object", "title": "_GetCollectionSchema", "properties": { "id": { "type": "number", "title": "Id", "default": null }, "user_id": { "type": "number", "title": "User Id", "default": null }, "name": { "type": "string", "title": "Name", "default": null }, "expires_at": { "type": "string", "title": "Expires At", "default": null, "format": "date-time" }, "created_at": { "type": "string", "title": "Created At", "default": null, "format": "date-time" } } } } } },
image
But there is only example of values and isn't schema.

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

4 participants