-
-
Notifications
You must be signed in to change notification settings - Fork 501
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
Mark Request parameters with default values as required #2149
Comments
If you provide to a GITHUB repo with a Minimal, Reproducible Example - with HelloController that reproduces the problem, then this ticket can be reopened. |
Done I updated and posted a controller where the issue is still there. The code ran was the same as the one above. Only change is still the version of the openapi dependancy |
We're also seeing this, setting a param to The fix for #2021 seems like the most likely cause at a quick glance. We have a mixed Kotlin/Java project, so I am suspecting that may be a prerequisite to repro it if 2021 is the cause. I will try and find some time to come up with a definitive case. |
Again not reproducible: You are describing a kotlin issue For this one, there is an enhancement for Kotlin projects you read the changelog.
|
Hi @bnasslahsen, I just stumbled upon the same issue and also created a repository to reproduce it: |
This could be an enhancement. Are you willing to propose a PR for it ? |
Sure, why not. This should do the trick. |
Describe the bug
Using @RequestParam(required = false) does not work since v2.0.3. It will always show the field as required in the specifications.
To Reproduce
Steps to reproduce the behavior:
3.0.4
2.0.4
java
Expected behavior
Expect the swagger docs to say the field is not required.
Screenshots
V2.0.4
V2.0.2
No code has been changed between both pictures. Only the version.
Additional context
Using Java 17
The text was updated successfully, but these errors were encountered: