OpenAPITools / OpenAPITools/openapi-generator
[BUG][JAVA] Gradle plugin ignores "templateDir"
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
Bug Report Checklist
- Have you provided a full/minimal spec to reproduce the issue?
- Have you validated the input using an OpenAPI validator (example)?
- What's the version of OpenAPI Generator used?
- Have you search for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Bounty to sponsor the fix (example)
Description
The Gradle plugin seems to ignore the templateDir argument set in build.gradle: the argument points to a non-existent directory but no exception is thrown when calling openApiGenerate (whereas a non-existent file as the inputSpec argument does throw).
openapi-generator version
Gradle plugin 4.2.3
OpenAPI declaration file content or url
Steps to reproduce
git clone git@github.com:rechvs/openapi-generator-gradle-plugin-debugging.git./gradlew openApiGenerate- No exception is thrown, despite templateDir pointing to a non-existent directory.
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 the linked build.gradle and openapi.yaml, then run ./gradlew openApiGenerate from the reproduction project. Trace how the Gradle plugin handles the templateDir argument and compare it with inputSpec validation; done means a nonexistent templateDir is reported instead of being silently ignored.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- build-system
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100