Skip to content

Conversation

@davidkiss
Copy link
Contributor

I updated code to include 'feign', a new java library and also created a CodegenConfig for JMeter

@wing328
Copy link
Contributor

wing328 commented Nov 28, 2015

@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.access$300(ServiceLoader.java:181)
    at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
    at java.util.ServiceLoader$1.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)

@davidkiss
Copy link
Contributor Author

@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.access$300(ServiceLoader.java:181)
at java.util.ServiceLoader$LazyIterator.next(ServiceLoader.java:365)
at java.util.ServiceLoader$1.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)
.

@davidkiss
Copy link
Contributor Author

The code should be fixed now.

@xhh
Copy link
Contributor

xhh commented Dec 1, 2015

@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 symbol

It 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.

@wing328
Copy link
Contributor

wing328 commented Dec 2, 2015

@davidkiss
Copy link
Contributor Author

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)
.

@wing328
Copy link
Contributor

wing328 commented Dec 2, 2015

@davidkiss and most importantly, thanks for your contribution to make the Java API client better :)

@davidkiss
Copy link
Contributor Author

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)
.

@xhh
Copy link
Contributor

xhh commented Dec 3, 2015

@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
@davidkiss
Copy link
Contributor Author

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-master

then 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)
.

Copy link
Contributor

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

Copy link
Contributor Author

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

@wing328
Copy link
Contributor

wing328 commented Dec 10, 2015

@davidkiss thanks. We'll review and merge accordingly.

wing328 added a commit that referenced this pull request Dec 10, 2015
adding support for both Java client using Netflix Feign and JMeter tests
@wing328 wing328 merged commit 83dc539 into swagger-api:master Dec 10, 2015
@wing328
Copy link
Contributor

wing328 commented Dec 10, 2015

@davidkiss FYI. I submitted #1700 to updated the sample and test case (ignored testLoginUser for the time being)

@davidkiss
Copy link
Contributor Author

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)
.

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.

3 participants