Integrate Swagger to Android

971 views
Skip to first unread message

Esti Zinger

unread,
Aug 16, 2016, 7:18:21 AM8/16/16
to Swagger
When I'm trying to build the sample project "petstore" it is build it with those dependencies:
compile "org.apache.httpcomponents:httpcore:4.4.4"
compile "org.apache.httpcomponents:httpmime:4.5.2"
compile "org.apache.httpcomponents:httpclient-android:4.3.3"
but then I get the error that there are duplicate files (in htttpmine and httpcore)
I saw that the recommended way is to use the okhttp-gson library, but then I had to add another jars because it is not enough.
has anyone done this before and can send me this sample project please?

Ron Ratovsky

unread,
Aug 16, 2016, 4:16:54 PM8/16/16
to swagger-sw...@googlegroups.com

Which sample project?

--
You received this message because you are subscribed to the Google Groups "Swagger" group.
To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Esti Zinger

unread,
Aug 17, 2016, 1:42:40 AM8/17/16
to Swagger

thak you for reply!

they have a swagger api "petstore", and in git there is project to build with (https://github.com/swagger-api/swagger-codegen)
so I built it to android project by this command:

java -jar modules/swagger-codegen-cli/target/swagger-codegen-cli.jar generate 
  -l android
  -o samples/client/petstore/android

it is realy build an android project, but when I am truing to run it - it is failed because duplicate files in the http libraries

can you help me?

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggersocket+unsub...@googlegroups.com.

Ron Ratovsky

unread,
Aug 17, 2016, 5:19:11 PM8/17/16
to swagger-sw...@googlegroups.com

It may be better to open a ticket on swagger-codegen.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.


For more options, visit https://groups.google.com/d/optout.

--

You received this message because you are subscribed to the Google Groups "Swagger" group.

To unsubscribe from this group and stop receiving emails from it, send an email to swagger-swaggers...@googlegroups.com.

wing328

unread,
Aug 18, 2016, 11:50:14 PM8/18/16
to Swagger
Please open a ticket via https://github.com/swagger-api/swagger-codegen/issues so that we can further help you.

(I seem to recall seeing similar error before but it should be resolved in the latest master)

Esti Zinger於 2016年8月17日星期三 UTC+8下午1時42分40秒寫道:
Reply all
Reply to author
Forward
0 new messages