OpenAPITools / OpenAPITools/openapi-generator
[BUG] [Gradle Plugin] ignoreFileOverride option is not working
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)?
- Have you tested with the latest master to confirm the issue still exists?
- Have you searched for related issues/PRs?
- What's the actual output vs expected output?
- [Optional] Sponsorship to speed up the bug fix or feature request (example)
Description
The generator totally neglects the 'ignoreFileOverride' property, it generates the default template instead of what is given in the property. The problem is not depend on the used language. If I put the the ignore file manually to the place where it should be generated ($buildDir/generated/openapi/), it works as it should.
openapi-generator version
5.0.1
Example
build.gradle:
openApiGenerate {
generatorName = "kotlin"
inputSpec = "$rootDir/xzy.yaml".toString()
outputDir = "$buildDir/generated/openapi".toString()
ignoreFileOverride = "$rootDir/.openapi-generator-ignore".toString()
}
.openapi-generator-ignore:
# OpenAPI Generator Ignore
src/**/org/
docs/
build.gradle
settings.gradle
README.md
Steps to reproduce
Use the config above, and run the openApiGenerate gradle task.
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 build.gradle openApiGenerate configuration and the Gradle task it invokes, using the issue's minimal example and .openapi-generator-ignore file. Run the openApiGenerate task and compare the generated output with and without ignoreFileOverride; done means the configured ignore file is honored instead of the default template.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- kotlin
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100