Add QueryString documentation when using TransferObject with @ModelAttribute as single argument #3029
Unanswered
angelomarzocchi
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'd like to add OpenAPI documentation to my project but I have the following problem :
I have a lot of RestController where th eonly input of the methods is a TransferObject with the @ModelAttribute annotation to map each field of the Transfer Object as a query parameter. In my real life scenario not every field is used for every request, so I would like to add some sort of documentation to specify which fields are used .
I have no idea how to achieve this result, can someone help ?
I'd like to add annotation to the RestController class, leaving the TO as it is.
Here I have an example of what I have in my project : https://github.com/angelomarzocchi/springdocdemo
And this is the documentation I have right now :
The result I want is to have productID and productName as parameters in the yml documentation.
Something like :
Thank you everyone in advance
Beta Was this translation helpful? Give feedback.
All reactions