You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
but it does not cover ANNOTATION_TYPE, so any annotation that would use RequestBody as a meta-annotation won't work. This is my case, as I have a special annotation for the request body that is not native to Spring.
Problem:
io.swagger.v3.oas.annotations.parameters.RequestBody
has three targets it can be used on:When springdoc resolves annotation in
AbstractRequestService.isRequestBodyParam()
, it checks if there's such annotation on a parameter directly:or on a method:
but it does not cover
ANNOTATION_TYPE
, so any annotation that would useRequestBody
as a meta-annotation won't work. This is my case, as I have a special annotation for the request body that is not native to Spring.Workaround:
Use two annotations:
I use full path because the name is the same between one in Swagger and one in Spring, and there are mix-ups.
Solution:
Check if
RequestBody
is a meta-annotation:This should cover both
PARAMETER
andANNOTATION_TYPE
cases.The text was updated successfully, but these errors were encountered: