-
Notifications
You must be signed in to change notification settings - Fork 6k
[Jaxrs] Add beanvalidation annotations and fix outer Enums #4492
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suggest we keep useBeanValidation to false similar to what we've done for other Java-related generator: https://github.com/swagger-api/swagger-codegen/search?l=Java&q=useBeanValidation&utf8=%E2%9C%93
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@jfiala I'll think about this more and get back to you.
@jfiala the Travis CI failed with the following error message:
The command "set -e" exited with 0.
$ /bin/bash ./bin/utils/detect_carriage_return.sh
modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/generatedAnnotation.mustache
modules/swagger-codegen/src/main/resources/JavaJaxRS/spec/beanValidation.mustache
Templates contain carriage return '/r'. Please remove it and try again.
Please take a look.
@wing328 I changed my git settings (on Windows) to git config --global core.autocrlf input and then did a reset for the branch as described here (https://help.github.com/articles/dealing-with-line-endings/#refreshing-a-repository-after-changing-line-endings) and checked in with corrected lf settings.
Is the recommended setting for autocrlf documented somewhere?
@wing328 the crlf are fixed now (one build is still failing due to an error at the Java library ok-http-gson, but I didn't change anything there).
Is the recommended setting for autocrlf documented somewhere?
It's not documented in our wiki at the moment. I'll put it in the contributing guideline shortlly.
Thanks for the suggestion 👍
@wing328 is there already an ETA for the next release 2.2.2?
I'd like to further work on the Jaxrs-languages (interface etc.), but I need my Beanvalidation-PRs to first get pulled in.
Should I add additional branches starting from the jaxrs-branches in my forked repo? Or is it better to wait for my PRs to get pulled in so I can restart from the (upstream) master?
@jfiala let me try to review later today and merge this in if there's no feedback from me or anyone from the community.
ETA for 2.2.2 is Jan/Feb 2017
@jfiala I ran some tests and didn't find any issue. Thanks for the enhancements.
@wing328 great, thx can you pls also take a look at the other beanvalidation PR's so we get them all in?
@jfiala yup, merged a few already. Would need your help to rebase one of them on the latest master.
@wing328 thx alot, I already noticed, I'll rebase the spring-branch and then let you know.
...pi#4492) * add beanvalidation to jaxrs and add support for outer Enums swagger-api#4091 * cleanup Codegen swagger-api#4091 * cleanup samples swagger-api#4091 * cleanup tabs * updated samples to petstore.yaml (before petstore.json) * add support for DecimalMin/DecimalMax/Min/Max swagger-api#4091 * add check for hideGenerationTimestamp swagger-api#4091 * replace tabs * correct line endings to lf
Uh oh!
There was an error while loading. Please reload this page.
PR checklist
./bin/to update Petstore sample so that CIs can verify the change. (For instance, only need to run./bin/{LANG}-petstore.shand./bin/security/{LANG}-petstore.shif updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)2.3.0branch for breaking (non-backward compatible) changes.Description of the PR