OpenAPITools / OpenAPITools/openapi-generator
[BUG] bin/utils/openapi-generator-cli.sh fails to detect lastest version
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
The script tries to download https://api.github.com/repos/openapitools/openapi-generator/releases and parse the latest version, but the download sometimes can fail and the script results in an error:
jq: error (at <stdin>:1): Cannot index string with string "prerelease"
Yet the script continues the maven build for the jar file and finally fails with error
[ERROR] Failed to execute goal org.apache.maven.plugins:maven-dependency-plugin:2.9:get (default-cli) on project standalone-pom: Invalid artifact, you must specify groupId:artifactId:version[:packaging][:classifier] org.openapitools:openapi-generator-cli
The script should not continue to run if the version parsing fails, or it should substitute with a default version.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with bin/utils/openapi-generator-cli.sh and reproduce the failed response from the GitHub releases API, focusing on the jq parsing error. Check the script's behavior before the Maven jar step; done means parsing failure no longer leads to the invalid-artifact Maven error, either by stopping or using a default version.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, shell
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 48/100