-
-
Notifications
You must be signed in to change notification settings - Fork 476
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@Parameter 'required' property is always ignored #252
Comments
Hi, This an expected bahaviour. You can have a look at: #14
If you need @GetMapping parameters to be optional, you can use: @RequestParam(required = false) |
@springdoc Its really correct behaviour. But why @parameter annotation data ignored? As i understood, swagger-annotations used for implicit declaration or overriding default parser behaviour. If this concept ignored, the usefulness of this library tends to zero. As you see in my code snippet, used my own parameter annotations. This an important case to override default request parameter handling. |
Hi there. |
Hi @little-fish, For Pageable, are you declaring using ?
|
Hi @bnasslahsen, Anyway, I still thinks that Back to my "issue". The problem with nullable |
Problem described by @glockbender still exist, and @RequestParam is not an option, because it override custom resolver by annotation completely, i need to make parameter with custom annotation to be optional and looks like it is impossible. |
+1 with this |
Code example:
But always parameter marks as 'required' in ui and json schema
The text was updated successfully, but these errors were encountered: