Skip to content

Allow nested @Schema annotations #655

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

Closed
agustisanchez opened this issue May 7, 2020 · 2 comments
Closed

Allow nested @Schema annotations #655

agustisanchez opened this issue May 7, 2020 · 2 comments

Comments

@agustisanchez
Copy link

With the Schema class, it is possible to define nested properties this way:

        new Schema().type("object")
                .addProperties("prop1",
                        new Schema().type("string"))
                .addProperties("prop2", 
                        new Schema().type("boolean"));

Apparently there's no way to achieve the same with the related @Schema annotation which forces to define classes only to generate documentation, which is not a good practice.

@zarebski-m
Copy link
Contributor

Both Schema class and @Schema annotation are part of swagger-core project, not springdoc-openapi. Please open feature request there: https://github.com/swagger-api/swagger-core

@agustisanchez
Copy link
Author

Moved to swagger-api/swagger-core#3547

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