-
Notifications
You must be signed in to change notification settings - Fork 66
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
Support url for inputFile #167
Labels
Comments
Before this feature is done, some work arounds are available to match this requirement task downloadSomething(type: MyDownload) {
sourceUrl = 'http://20.20.20.66:32601/v2/api-docs?group=Default'
target = new File('petstore.yaml')
}
generateSwaggerCode.dependsOn downloadSomething
class MyDownload extends DefaultTask {
@Input
String sourceUrl
@OutputFile
File target
@TaskAction
void download() {
ant.get(src: sourceUrl, dest: target)
}
}
swaggerSources {
petstore {
inputFile = file('petstore.yaml')
code {
language = 'spring'
}
}
} Reference: https://stackoverflow.com/questions/17123606/how-to-download-external-files-in-gradle |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the feature
swagger-codegen-cli allows to pass an url for input file specifications and can generate over that. Swagger maven codegen plugin supports the same so as open api plugin.
Why do you want the feature?
This will bring feature parity and is very useful in generating client directly from public definition urls.
The text was updated successfully, but these errors were encountered: