-
Notifications
You must be signed in to change notification settings - Fork 86
Incorrect logic of @ModelAttribute support #380
Comments
Thanks for reporting, some problems with this troublesome annotation was expected. We'll take a look. |
sorry for the inconvenience. I will try to reproduce the issue. Are you using the snippet with HandleMethodArgumentresolvers set or without? |
Without. I have only custom class |
I tested your example in my own test project (jdk11). But I could not reproduce the issue. Please provide more information how to produce the issue. I have attached the generated modelattribute.adoc fil: auto-modelattribute.adoc.txt |
|
Without specifying the HandleMethodArgumentResolvers (AutoDocumentation.modelAttribute(null),) you need to explicitly set @ModelAttribute. If you set HandleMethodArgumentResolvers all Arguments which are not supported by any HandleMethodArgumentResolver are documented. In your example the Array resolvers is empty. You need to explicitly create a Mock of HandleMethodArgumentResolver which supports @RequestHeader. Using |
In such case with
|
Hi @m-titov, I also couldn't reproduce issues mentioned here. The best would be to create an example (feel free to use samples project in SARD repo) and create a PR where this is clearly failing. |
Hi @jmisur |
Hi this should be fixed in latest 2.0.9-SNAPSHOT. Can you evaluate? |
Yes, it looks good to me now |
See #368
The
@RequestHeader
shouldn't be treated as request parameter. For example,The text was updated successfully, but these errors were encountered: