Comments (6)
Yes, I did but not with this plugin.
Take a look at this excellent guide: https://www.jcore.com/2017/05/22/automatically-generating-api-using-swagger-and-gradle/
I ended up creating a partly generic gradle task based on that example. I am on vacation now (answering from my phobe), but I think this is all you need.
https://gist.github.com/steam0/4fa11ad0660d33192ec01cd84050f226
from swagger-codegen-gradle-plugin.
Example:
I want to run both these configurations in the same swagger generation run.
Api1
swagger {
inputSpec = 'http://localhost:8081/v2/api-docs'
outputDir = 'build/generated-sources/apifromserver1'
lang = 'spring'
addDynamicProperty 'sourceFolder', ''
additionalProperties = [
'modelPackage': 'com.github.apifromserver1',
]
systemProperties = [
'models': ''
]
}
Api2
swagger {
inputSpec = 'http://localhost:8082/v2/api-docs'
outputDir = 'build/generated-sources/server2name
lang = 'spring'
addDynamicProperty 'sourceFolder', ''
additionalProperties = [
'modelPackage': 'com.github.server2name,
]
systemProperties = [
'models': ''
]
}
from swagger-codegen-gradle-plugin.
Hi,
I would like the same functionality.
steam0 did you come with a solution?
from swagger-codegen-gradle-plugin.
Awesome! Just what I was looking after.
Thanks a lot! :-D
from swagger-codegen-gradle-plugin.
This is great ! It would be even more flexible than a plugin as it would allow changing swagger-codegen version dynamically. I'll keep it in mind !
from swagger-codegen-gradle-plugin.
I've updated README and example with this. Fixes a lot of issues people were having. Thanks for the tip
from swagger-codegen-gradle-plugin.
Related Issues (20)
- [Feature Request] Add support for incremental builds HOT 1
- [Feature Request] Support for multiple input specs HOT 1
- Published location HOT 4
- Multiple Tasks HOT 2
- License? HOT 6
- Pass swagger-codegen version as argument HOT 2
- Version 1.6.3 at the plugin repo doesn't match the example HOT 1
- Question about configuration (documentation issue?) HOT 1
- How to configure cleanOutputDir HOT 3
- ignoreFileOverride properties dont work for me HOT 1
- Doesn't seem to create output files HOT 4
- Generated Code Output Dir HOT 1
- Allow more than one language generation HOT 1
- Read swagger.yaml from dependency jar HOT 1
- Plugin tries to clean project dir HOT 1
- Question regarding customised generator HOT 4
- Problem with ignoreFileOverride HOT 3
- Deprecation question! HOT 7
- No "Issues" tab for swagger-codegen-gradle-plugin-example
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swagger-codegen-gradle-plugin.