Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Import swagger into existing project in Android Studio

Hello I'd like to add swagger generated zip into my gradle powered android project in Android studio. Which way is the best practice to import it continuously every time when swagger file change?

Now I'm executing

mvn package

in unzipped dir from swagger UI generator, then I copy mvn-generated jar into libs in android project. I also copied dependencies from generated gradle file.

I'm sure somebody knows more elegant way how to deal with swagger in android studio.

Thanks for any help.

like image 343
matusalem Avatar asked Sep 25 '22 17:09

matusalem


1 Answers

You have several options. The easiest is to copy the files from your downloaded client into your project and add the dependencies from the pom.xml or gradle build file, both which are generated when using the java target in the online swagger codegen.

like image 164
fehguy Avatar answered Oct 11 '22 06:10

fehguy