using @Examples()
on a model
#2631
Closed
VictoriqueMoe
started this conversation in
General
Replies: 1 comment 7 replies
-
FYI, this PR on my application is for this change for additinal context waifuvault/WaifuVault#131 |
Beta Was this translation helpful? Give feedback.
7 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
hello.
I have the following decorator in my argument:
this is a Parameter.
I like this because in swagger, you can get a dropdown of all the eamples
![image](https://private-user-images.githubusercontent.com/27996712/315334773-6f24a5d2-cbbe-449b-946a-a5290c574f23.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDM2NzMsIm5iZiI6MTczOTQ0MzM3MywicGF0aCI6Ii8yNzk5NjcxMi8zMTUzMzQ3NzMtNmYyNGE1ZDItY2JiZS00NDliLTk0NmEtYTUyOTBjNTc0ZjIzLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEwNDI1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPTY5ZTIzNjJlMmRjM2E2MTdjYWE2OTNkMTliODBmMjk1MzVkODcxOTVhYjQ4ZTI1OWY1MDFhYTE0NmQ0ODM3MTQmWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.nRhblmskpTPnN6oSNEJ_Cp7xeFtd9YnrO59-fklfyss)
![image](https://private-user-images.githubusercontent.com/27996712/315335018-ed4a8993-e806-436e-864f-a1c0d6d5c9ab.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3Mzk0NDM2NzMsIm5iZiI6MTczOTQ0MzM3MywicGF0aCI6Ii8yNzk5NjcxMi8zMTUzMzUwMTgtZWQ0YTg5OTMtZTgwNi00MzZlLTg2NGYtYTFjMGQ2ZDVjOWFiLnBuZz9YLUFtei1BbGdvcml0aG09QVdTNC1ITUFDLVNIQTI1NiZYLUFtei1DcmVkZW50aWFsPUFLSUFWQ09EWUxTQTUzUFFLNFpBJTJGMjAyNTAyMTMlMkZ1cy1lYXN0LTElMkZzMyUyRmF3czRfcmVxdWVzdCZYLUFtei1EYXRlPTIwMjUwMjEzVDEwNDI1M1omWC1BbXotRXhwaXJlcz0zMDAmWC1BbXotU2lnbmF0dXJlPWJhYzJmOGVkMTgzNTRmMjE3YTFhZjQwMDY3MjkyOTEzZjczNTExZTI1MDEzMTFiYjQwM2EyNDliZmQ1MzhjODImWC1BbXotU2lnbmVkSGVhZGVycz1ob3N0In0.O0gV_05GceAJ8YQiD4-ffDX-Jk4FtSFBRE0wvN0gGfc)
I am now moving all the
@QueryParams
to an model object to not pollute the class. my object looks as follows:I want the examples to stay for
expires
. however the@Examples()
decorator is only aParameterDecorator
and the non-plural version@Example()
does not do the same thing, all that seems to do is fill in the input with a default value. not a dropdown like@Examples()
Is there a way so that the model can have
Examples()
and it renders in the swagger of a deropdown of examples?Beta Was this translation helpful? Give feedback.
All reactions