Skip to content

[jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation - #6494

Merged
wing328 merged 6 commits into
OpenAPITools:masterfrom
ruedigerk:fix_issue4280
Mar 15, 2021
Merged

[jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation#6494
wing328 merged 6 commits into
OpenAPITools:masterfrom
ruedigerk:fix_issue4280

Conversation

@ruedigerk

Copy link
Copy Markdown
Contributor

This PR adds missing @NotNull annotations for required body parameters when using BeanValidation and fixes #4280.

I fixed all jaxrs generators which use identical bodyParams.mustache files (my company is affected by this bug in the jaxrs-spec generator):

  • jaxrs-cxf
  • jaxrs-cxf-extended
  • jaxrs-spec

Please review by Java technical committee:
@bbdouglas (2017/07) @sreeshas (2017/08) @jfiala (2017/08) @lukoyanov (2017/09) @cbornet (2017/09) @jeff9finger (2018/01) @karismann (2019/03) @Zomzog (2019/04) @lwlee2608 (2019/10) @bkabrda (2020/01)

PR checklist

  • Read the contribution guidelines.
  • If contributing template-only or documentation-only changes which will change sample output, build the project before.
  • Run the shell script(s) under ./bin/ (or Windows batch scripts under.\bin\windows) to update Petstore samples related to your fix. This is important, as CI jobs will verify all generator outputs of your HEAD commit, and these must match the expectations made by your contribution. You only need to run ./bin/{LANG}-petstore.sh, ./bin/openapi3/{LANG}-petstore.sh if updating the code or mustache templates for a language ({LANG}) (e.g. php, ruby, python, etc).
  • File the PR against the correct branch: master, 4.3.x, 5.0.x. Default: master.
  • Copy the technical committee to review the pull request if your PR is targeting a particular programming language.

Comment thread modules/openapi-generator/src/main/resources/JavaJaxRS/spec/bodyParams.mustache Outdated
@wing328 wing328 added this to the 5.0.0 milestone Jun 16, 2020
@wing328 wing328 modified the milestones: 5.0.0, 5.0.1 Dec 21, 2020
@wing328 wing328 modified the milestones: 5.0.1, 5.1.0 Feb 8, 2021
@ruedigerk

Copy link
Copy Markdown
Contributor Author

I have resolved all issues found in the code review and the PR is waiting since 8 months to be merged. Is there a problem that still needs to be addressed?

@ruedigerk

Copy link
Copy Markdown
Contributor Author

@wing328 please merge this PR. I have completed all tasks and I am waiting since months for this fix to be merged. I just rebased it on top of the latest master branch an reran all checks.

@wing328

wing328 commented Mar 15, 2021

Copy link
Copy Markdown
Member

@ruedigerk sorry that I missed the update :( Too many users tagged me

Thanks for taking my feedback and update the PR accordingly. It looks good to me.

@wing328
wing328 merged commit a8c56fb into OpenAPITools:master Mar 15, 2021
@wing328 wing328 changed the title [jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation, fixes #4280 [jaxrs-cxf][jaxrs-spec] Add missing @NotNull annotation for required body parameters when using BeanValidation Mar 16, 2021
@wing328

wing328 commented Mar 22, 2021

Copy link
Copy Markdown
Member

@ruedigerk thanks for the PR, which has been included in the v5.1.0 release: https://twitter.com/oas_generator/status/1373636654024380423

@ruedigerk
ruedigerk deleted the fix_issue4280 branch March 27, 2021 07:44
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.

[BUG] NotNull annotation is not set for requiered body in jaxrs-cxf

2 participants