-
Notifications
You must be signed in to change notification settings - Fork 86
Documenting RequestParam DTOs #426
Comments
Thanks for the submition, let's discuss details on the PR. |
Hi @mustaphazorgati. I just looked into this again and realised what you are trying to achieve is actually a support for ModelAttribute without annotation. If I'm getting this right, from documentation of method arguments:
We already have a support for @ModelAttribute annotation via JacksonModelAttributeSnippet. See controller and test. This one could theoretically work without annotation if I look at the implementation logic. So what I would propose you to do:
If none of this will work, or will work in a different than intended way, please share your results with us. |
Hey @jmisur, |
Are you able to check master on your project? |
I'll grab the newest snapshot version and verify it :) |
Everything works like a charm! |
Not so fast. I regenerated documentation, and now it's outputting also specialised DTOs like |
good point. If you agree I'll create a new PR shortly. |
Yes I agree. Let's rollback the last PR (to some extent) and just request users to use the annotation. It's the simplest and not really an intrusive approach. |
Alright. PR coming later today. |
Hey @jmisur, I have a little issue. After reverting the I think that was not an issue until now, because the previous behavior stopped after getting the first Type. Now the snippet returns multiple types if multiple annotated parameters exist. Can you help me out here?
|
Hey @jmisur, did you have a chance to look at this? |
I did but I need to dig a bit deeper into this. |
If I can help somehow let me know. :) |
I think I got it ^^. |
Hey @jmisur! I had a look through your PR and I am a little confused. |
That method was a devil in disguise. It was basically performing a supports function of What we're doing now is just delegating the resolution of supporting the current argument onto the chain of |
Thank you for the explanation! :) |
Me too. Took just a couple of months... 🙈 |
Ah well. We got there eventually. Thanks for the update! |
Because we have too many request parameter for some endpoints we decided to wrap them into dedicated DTO like so:
Unfortunately this way the code looks clean, but the request parameters which are contained within each DTO are not documented.
Is this currently not supported or are we doing something wrong?
The text was updated successfully, but these errors were encountered: