Skip to content

Conversation

@jfiala
Copy link
Contributor

@jfiala jfiala commented Jan 6, 2017

PR checklist

  • Read the contribution guildelines.
  • Ran the shell/batch script under ./bin/ to update Petstore sample so that CIs can verify the change. (For instance, only need to run ./bin/{LANG}-petstore.sh and ./bin/security/{LANG}-petstore.sh if updating the {LANG} (e.g. php, ruby, python, etc) code generator or {LANG} client's mustache templates)
  • Filed the PR against the correct branch: master for non-breaking changes and 2.3.0 branch for breaking (non-backward compatible) changes.

Description of the PR

add beanvalidation annotation support to jaxrs-resteasy

for details see #4091

@jfiala jfiala changed the title [Jaxrs-Resteasy] add beanvalidation annotations [Jaxrs-Resteasy] Add beanvalidation annotations Jan 6, 2017
public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen implements JbossFeature {
public class JavaResteasyServerCodegen extends AbstractJavaJAXRSServerCodegen implements JbossFeature, BeanValidationFeatures {

protected boolean useBeanValidation = true;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please use 4-space instead of tab.

What about setting useBeanValidation to false to start with similar to what we've done for Java API client?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cleaned the tabs, I set useBeanValidation=true because @cbornet suggested to do so (i.e. BeanValidation is a basic feature every language should support automatically). Of course we can also set to false, please advise what is preferred?

@jfiala
Copy link
Contributor Author

jfiala commented Jan 19, 2017

@wing328 pls review especially this pr soon, as I'd like to rework the resteasy language...

@wing328
Copy link
Contributor

wing328 commented Jan 19, 2017

@jfiala let me review it now...

@wing328 wing328 merged commit 6f4e82d into swagger-api:master Jan 19, 2017
@wing328
Copy link
Contributor

wing328 commented Jan 19, 2017

@jfiala I did some tests and the results looked good.

For rework, I definitely welcome the idea and believe the change should target 2.3.0

@jfiala jfiala deleted the jaxrs_resteasy_beanval2 branch January 19, 2017 19:41
davidgri pushed a commit to davidgri/swagger-codegen that referenced this pull request May 11, 2017
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