-
-
Notifications
You must be signed in to change notification settings - Fork 6.7k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[BUG] Gradle plugin doesn't support remote locations for inputSpec #8255
Labels
Comments
5 tasks
Please what is the status of this? any temp fixes? |
5 tasks
Last known version which worked for me was |
Can you please advise when it will be fixed? |
Same issue here. Stacktrace:
Maybe |
A workaround is to use a gradle-download-task as dependency. Example (using Gradle Kotlin DSL): plugins {
id 'org.openapi.generator' version '6.0.1'
id 'de.undercouch.download'
}
task downloadApiDefinition(type: Download) {
src "https://URL-HERE"
dest "$buildDir/downloads/api-specification.json"
}
task generateTypes(type: GenerateTask) {
dependsOn(downloadApiDefinition)
inputSpec = "$buildDir/downloads/api-specification.json"
....
} |
any updates here? |
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Bug Report Checklist
Description
The OpenAPI Generator Gradle Plugin doesn't support remote locations (i. e. HTTPS URLs) for the input specification (
inputSpec
) anymore.This is a breaking change between OpenAPI Generator Gradle Plugin 4.3.1 and 5.0.0 and thus should either be listed in the release notes or fixed in a patch release.
Repository to illustrate and reproduce the issue:
https://github.com/joschi/openapi-generator-gradle-remote-input
The following setup was working with the OpenAPI Generator Gradle Plugin 4.3.1:
build.gradle with OpenAPI Generator Gradle Plugin 4.3.1
Build output
Using the OpenAPI Generator Gradle Plugin 5.0.0, the same setup results in an error:
build.gradle with OpenAPI Generator Gradle Plugin 5.0.0
Build output
openapi-generator version
5.0.0
OpenAPI declaration file content or url
https://raw.githubusercontent.com/OAI/OpenAPI-Specification/master/examples/v3.0/petstore.yaml
Generation Details
See https://github.com/joschi/openapi-generator-gradle-remote-input
Steps to reproduce
Clone the https://github.com/joschi/openapi-generator-gradle-remote-input Git repository and build the
main
(OpenAPI Generator Gradle Plugin 5.0.0) andopenapi-generator-4.3.1
(OpenAPI Generator Gradle Plugin 4.3.1) branches with:You can also check out the output of the GitHub build workflow:
https://github.com/joschi/openapi-generator-gradle-remote-input/actions
Related issues/PRs
#6716
Suggest a fix
One can work around this regression by downloading the OpenAPI specifications in an additional step, for example using the Gradle Download Task plugin:
build.gradle
with download task:The text was updated successfully, but these errors were encountered: