Skip to content

[Java] Use correct annotation for optional request body #4701

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

hinrik
Copy link
Contributor

@hinrik hinrik commented Dec 4, 2019

This adds required=false to the @RequestBody annotation when the OpenAPI
definition has the body marked as not required.

@bbdouglas @sreeshas @jfiala @lukoyanov @cbornet @jeff9finger @karismann @Zomzog @lwlee2608

@hinrik hinrik changed the title Use correct annotation for optional request body [Java] Use correct annotation for optional request body Dec 4, 2019
@wing328
Copy link
Member

wing328 commented Dec 10, 2019

Please remove the line break from the mustache templates (bodyParams.mustache) and run the following to update the Petstore samples so that the CIs can verify the change.

./bin/spring-all-petstore.sh
./bin/java-pkmst-petstore-server.sh
./bin/kotlin-springboot-petstore-all.sh

This adds `required=false` to the `@RequestBody` annotation when the OpenAPI
definition has the body marked as not required.
@hinrik hinrik force-pushed the java_optional_request_body branch from 5a9dffd to e78c9f6 Compare December 10, 2019 09:30
@hinrik
Copy link
Contributor Author

hinrik commented Dec 11, 2019

Is that CircleCI failure actually related to the change?

@wing328
Copy link
Member

wing328 commented Dec 26, 2019

Not related to this PR and we've fixed it in the latest master.

Please resolve the merge conflicts and pull the latest master into your branch.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants