Skip to content

Request parameter object is shown incorrectly on UI #268

Closed
@martin-tarjanyi

Description

@martin-tarjanyi

Request parameter object of GET request is shown as JSON on swagger-ui instead of individual parameters.

image

This issue has been mentioned a few times before:

These all have been closed as they are caused by an issue in swagger-ui project. However, that issue was opened 18 months ago and there is not much activity on that project so I don't expect it to be fixed anytime soon (if ever).

Would it be possible to generate parameters in the OpenAPI docs such a way that it can be correctly presented by swagger-ui?

I created a demo project with 2 endpoints:
https://github.com/martin-tarjanyi/openapi-ui-issue/blob/master/src/main/java/com/example/openapiuiissue/DemoController.java#L13-L23

As I understand semantically there is no difference between them. However, the generated API docs (and in consequence the UI) is quite different.

I'm rising this issue again because this is the only thing which prevents me from moving all my projects to springdoc. I also would be happy to contribute to solve this issue if possible.

Metadata

Metadata

Assignees

No one assigned

    Labels

    invalidThis doesn't seem right

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions