-
Notifications
You must be signed in to change notification settings - Fork 6k
adding support for both Java client using Netflix Feign and JMeter tests #1625
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
@davidkiss thanks for the PR. The build failed with the following error message:
Exception in thread "main" java.util.ServiceConfigurationError: io.swagger.codegen.CodegenConfig: Provider io.swagger.codegen.languages.JMeterCodegen not found
at java.util.ServiceLoader.fail(ServiceLoader.java:231)
at java.util.ServiceLoader.access300ドル(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
at java.util.ServiceLoader1ドル.next(ServiceLoader.java:445)
at io.swagger.codegen.Codegen.getExtensions(Codegen.java:125)
at io.swagger.codegen.Codegen.<clinit>(Codegen.java:152)
at io.swagger.generator.DynamicSwaggerConfig.<clinit>(DynamicSwaggerConfig.java:67)
at io.swagger.generator.Bootstrap.init(Bootstrap.java:32)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)
@wing328 it's my bad. I forgot to check-in the class to git. Let me fix
that quickly
On Nov 27, 2015 10:39 PM, "wing328" notifications@github.com wrote:
@davidkiss https://github.com/davidkiss thanks for the PR. The build
failed with the following error message:Exception in thread "main" java.util.ServiceConfigurationError: io.swagger.codegen.CodegenConfig: Provider io.swagger.codegen.languages.JMeterCodegen not found
at java.util.ServiceLoader.fail(ServiceLoader.java:231)
at java.util.ServiceLoader.access300ドル(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
at java.util.ServiceLoader1ドル.next(ServiceLoader.java:445)
at io.swagger.codegen.Codegen.getExtensions(Codegen.java:125)
at io.swagger.codegen.Codegen.(Codegen.java:152)
at io.swagger.generator.DynamicSwaggerConfig.(DynamicSwaggerConfig.java:67)
at io.swagger.generator.Bootstrap.init(Bootstrap.java:32)
at org.eclipse.jetty.servlet.ServletHolder.initServlet(ServletHolder.java:612)
at org.eclipse.jetty.servlet.ServletHolder.initialize(ServletHolder.java:395)
at org.eclipse.jetty.servlet.ServletHandler.initialize(ServletHandler.java:871)
at org.eclipse.jetty.servlet.ServletContextHandler.startContext(ServletContextHandler.java:298)
at org.eclipse.jetty.webapp.WebAppContext.startWebapp(WebAppContext.java:1349)
at org.eclipse.jetty.maven.plugin.JettyWebAppContext.startWebapp(JettyWebAppContext.java:296)—
Reply to this email directly or view it on GitHub
#1625 (comment)
.
The code should be fixed now.
@davidkiss I just pushed a commit to include petstore sample for feign: https://github.com/xhh/swagger-codegen/commit/eb0e47461c09e442384a7034bce215525be9279d
you can pull it from the davidkiss-master branch.
However, there's compilation error:
cd samples/client/petstore/java/feign
mvn compile
[ERROR] /Users/xhh/builds/swagger-codegen/samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java:[3,24] error: cannot find symbolIt seems that ApiException.java is missing (not generated). Could you fix it?
After that, it would be nice to copy and tweak the unit tests from here to the feign sample, and make sure it pass.
@davidkiss FYI. Here is the contribution guidelines: https://github.com/swagger-api/swagger-codegen/wiki/Guidelines-for-Contribution
Thanks for the guideline. I'm progressing with the changes suggested and
will get back to you guys with the fixes shortly.
On Dec 2, 2015 11:10 AM, "wing328" notifications@github.com wrote:
@davidkiss https://github.com/davidkiss FYI. Here is the contribution
guidelines:
https://github.com/swagger-api/swagger-codegen/wiki/Guidelines-for-Contribution—
Reply to this email directly or view it on GitHub
#1625 (comment)
.
@davidkiss and most importantly, thanks for your contribution to make the Java API client better :)
I don't seem to have permissions to push to
https://github.com/xhh/swagger-codegen/tree/davidkiss-master branch. Should
I update my original pull request instead?
On Wed, Dec 2, 2015 at 11:14 AM, wing328 notifications@github.com wrote:
@davidkiss https://github.com/davidkiss and most importantly, thanks
for your contribution to make the Java API client better :)—
Reply to this email directly or view it on GitHub
#1625 (comment)
.
@davidkiss right, you juts need to update your branch by pulling (fetch and merge) my branch:
git add xhh git@github.com:xhh/swagger-codegen.git git fetch xhh git merge xhh/davidkiss-master
then the next time you git push your branch the PR will display new commits automatically.
Conflicts: samples/client/petstore/java/feign/README.md samples/client/petstore/java/feign/build.gradle samples/client/petstore/java/feign/pom.xml samples/client/petstore/java/feign/settings.gradle samples/client/petstore/java/feign/src/main/java/io/swagger/client/ApiClient.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/StringUtil.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/PetApi.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/StoreApi.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/api/UserApi.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Category.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Order.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Pet.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/Tag.java samples/client/petstore/java/feign/src/main/java/io/swagger/client/model/User.java
I merged davidkiss-master into my branch and added the unit tests.
All the api tests are passing except for UserApiTest.testLoginUser().
The response should be in JSON format, but it's plain text:"logged in user
session:1449468169868".
Is this something that can be fixed on the server side?
Btw the PR should display my latest changes
On Wed, Dec 2, 2015 at 11:53 PM, Xu Hui Hui notifications@github.com
wrote:
@davidkiss https://github.com/davidkiss right, you juts need to update
your branch by pulling (fetch and merge) my branch:git add xhh git@github.com:xhh/swagger-codegen.git
git fetch xhh
git merge xhh/davidkiss-masterthen the next time you git push your branch the PR will display new
commits automatically.—
Reply to this email directly or view it on GitHub
#1625 (comment)
.
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.
Have you tried the mustache tag isBodyParam to see if it meets your requirement? If it does, I suggest we avoid introducing another tag x-isBody via vendor extensions.
Ref: https://github.com/swagger-api/swagger-codegen/wiki/Mustache-Template-Variables
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 replaced x-isBody with isBodyParam as suggested
@davidkiss thanks. We'll review and merge accordingly.
adding support for both Java client using Netflix Feign and JMeter tests
@davidkiss FYI. I submitted #1700 to updated the sample and test case (ignored testLoginUser for the time being)
Thanks, @wing328!
On Dec 10, 2015 11:42 AM, "wing328" notifications@github.com wrote:
@davidkiss https://github.com/davidkiss FYI. I submitted #1700
#1700 to updated the
sample and test case (ignored testLoginUser for the time being)—
Reply to this email directly or view it on GitHub
#1625 (comment)
.
I updated code to include 'feign', a new java library and also created a CodegenConfig for JMeter