Skip to content

Support for Groovy metaclass/metadata  #509

Closed
@felixsemmler

Description

@felixsemmler

Feature
We use groovy in our Spring Boot microservice and tried to migrate from springfox/swagger to springdoc-openapi but ran into an issue. If the response of a RestController method is a groovy class, it breaks the whole swagger-ui. Swagger generates multiple schemas from the groovy metadata, which are also nested multiple times. This ended up that swagger-ui is not useable anymore and the browser requires a lot of memory and the browser tab/window is also not useable anymore.

I could not find a way to configure springdoc or swagger to ignore these metadata from groovy. With springfox/swagger it was possible by this way:
springfox/springfox#752 (comment)

Reproduce
I've created a minimal project which shows the problem to reproduce this issue:
https://github.com/felixsemmler/springdoc-swagger-issue

You can also check the branches java-model and kotlin-model, to see that it works fine if the response type is a java or kotlin class instead of groovy.

Expected behavior
The groovy metaclass informations should be ignored and not visible in the swagger-ui.

Screenshots
I also attached screenshots which should explain the problem in an easy way.
Bildschirmfoto 2020-03-26 um 12 45 21
Bildschirmfoto 2020-03-26 um 12 45 52

If I can provide you more information or help you with solving this issue, please let me know. Thx in advance for your help and the great work on springdoc-open-api.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions