-
Notifications
You must be signed in to change notification settings - Fork 2.2k
How to specify response schema for Page (org.springframework.data.domain.Page) of objects #3723
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
Comments
Hi everyone If you have the same issue with Page or in general with generics, the below workaround seems to work.
Cheers, Artem |
Thank you very much for sharing the solution! |
#4129 addresses this by introducing field |
How would you use this ? I tried on my endpoint without success but I may be doing something wrong |
Hello swagger team,
I have a simple method which returns Page (org.springframework.data.domain.Page) of user objects. How can I specify schema for such response? Both, @Schema(implementation = Page.class)) and @Schema(implementation = User.class)), produce incorrect result. Please refer to the example below.
Thank you. Looking forward for your feedback.
Cheers,
Artem
The text was updated successfully, but these errors were encountered: