-
Notifications
You must be signed in to change notification settings - Fork 6k
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
[Jaxrs-Resteasy] Improvements for Jaxrs-Resteasy #4512
Comments
@jfiala What do you think about putting the EAP version in the language name? For example, renaming jaxrs-resteasy to jaxrs-reasteasy-eap7? RestEasy 3 (and other libs in pom) are not included in EAP6, so jaxrs-resteasy did not build for me out of the box. |
@mbucc I think this would be a good starting point, as I worked only with EAP 7 here, this way we can also target for 2.2.2. I'd add a new language jaxrs-resteasy-eap7 and wouldn't change the existing jaxrs-resteasy in the first place. @wing328 what do you think? |
@jfiala FWIW, you can rename existing jaxrs-resteasy if you like. It will not work with eap6. |
@mbucc for which Resteasy/Jboss version was the current implementation supposed for? |
@jfiala here is my understanding: existing jaxrs-resteasy codegen only works for EAP 7.
Note that the servlet api version could be upgraded as well; 2.5 was last used in EAP 5: (https://access.redhat.com/articles/113373) I can contribute files for eap 6, assuming I can get past the ApiResponse issue I opened in #4617. |
@jfiala I just realized something. Resteasy is a stand alone library, so I suspect the author built this codegen for that scenario. At work, I use JBoss container, which provides RestEasy, so I was only thinking about this codegen in context of JBoss. But there are other containers where the war artifact built here will work just fine. Sorry for the diversion! (Seems like I should simply create a jboss6-resteasy codegen based on this one. Sound reasonable to you?) |
@mbucc OK, thx for the clarification. I'd like to provide the first draft with name resteasy-jboss and I'll test it for both jboss 6 and 7 eap (better put language first, then target jee server). In the next step/release 2.3, we could replace the existing resteasy language. |
@mbucc I added a first re-implementation of Jaxrs Resteasy in PR #4712, please take a look when you have time. I added all resteasy dependencies (also resteasy-jackson2-provider) as provided, so it doesn't depend on a specific resteasy version. I verified it to deploy on Jboss EAP 6 + 7 without errors. |
I also added the option to generate the Swagger contract dynamically. |
@mbucc may I know if you've time to run some tests for this change? Here are the steps:
|
* add language for resteasy eap #4512 * first implementation of jaxrs-resteasy-eap #4512 * add support for joda and java8 datetime types #4512 * add new file JacksonConfig and new sample eap-joda #4512 * add dynamic swagger support to jaxrs-resteasy-eap #4512 * adapt readme for eap #4512 * add tests for jaxrs-resteasy-eap #4512 * cleanup tabs #4512 * cleanup tabs #4512 * cleanup tabs #4512 * cleanup tabs / regenerate without joda #4512 * regenerate with updated templates #4512 * fix test (wrong setter invoked) #4512 * fix test #4512 * fix no invocation #4512 * replace tabs with spaces #4512
…-api#4712) * add language for resteasy eap swagger-api#4512 * first implementation of jaxrs-resteasy-eap swagger-api#4512 * add support for joda and java8 datetime types swagger-api#4512 * add new file JacksonConfig and new sample eap-joda swagger-api#4512 * add dynamic swagger support to jaxrs-resteasy-eap swagger-api#4512 * adapt readme for eap swagger-api#4512 * add tests for jaxrs-resteasy-eap swagger-api#4512 * cleanup tabs swagger-api#4512 * cleanup tabs swagger-api#4512 * cleanup tabs swagger-api#4512 * cleanup tabs / regenerate without joda swagger-api#4512 * regenerate with updated templates swagger-api#4512 * fix test (wrong setter invoked) swagger-api#4512 * fix test swagger-api#4512 * fix no invocation swagger-api#4512 * replace tabs with spaces swagger-api#4512
Description
The generated code stubs are way to complicated, in fact only the following files are needed for Resteasy (verified with Jboss EAP 7):
Additional Fixes
Datetime-Support
This language supports Java8 and Joda datetime using the JacksonConfig, the needed dependencies included automatically (see pom.mustache).
I added the flag "joda" to AbstractJavaCodegen.java to allow checking for joda in the mustache templates.
Further Enhancements
Questions
(see https://github.com/swagger-api/swagger-core/wiki/Swagger-Core-RESTEasy-2.X-Project-Setup-1.5)
Swagger-codegen version
2.2.2-SNAPSHOT
Related issues
#4447 regarding the Swagger annotations
#4461 regarding WAR-file
#4123 for enums
#3446 for tag support
Suggest a Fix
If you like, I can provide a new simplified Resteasy language.
Using the dynamic Swagger contract generator it provides true turnaround development...
The text was updated successfully, but these errors were encountered: