OpenAPITools / OpenAPITools/openapi-generator
[BUG] batch with asterisk filename does not work in docker
Nobody has claimed this yet.
- Dominant language
- Java
- Stars
- 26.8k
- Forks
- 7.7k
- PR merge metrics
- PR metrics pending
Description
- Follow example steps from the documentation https://openapi-generator.tech/docs/usage#batch (ignore for now that documentation is outdated and references csharp-netcore which was renamed)
> ls
csharp.yaml kotlin.yaml shared
> openapi-generator-cli batch *.yaml
...
[pool-1-thread-2] Finished generating kotlin…
[FAIL] Completed with 1 failures, 1 successes
- Now, try the same command with docker:
> docker run -v ${PWD}:/local openapitools/openapi-generator-cli batch *.yaml
...
[main] ERROR o.o.c.config.CodegenConfigurator - csharp.yaml (No such file or directory)
For whatever reason, wildcard/asterisk resolution just does not seem to work with docker setup.
> docker run -v ${PWD}:/local openapitools/openapi-generator-cli batch /local/*.yaml
...
[main] ERROR o.o.c.config.CodegenConfigurator - /local/*.yaml (No such file or directory)
However, the direct resolution works:
> docker run -v ${PWD}:/local openapitools/openapi-generator-cli batch /local/kotlin.yaml
...
[SUCCESS] Batch generation finished 1 generators successfully.
What's even more strange to me, that the original "java -jar ..." command issued by docker-entrypoint.sh does not work unless wrapped in sh -c which suggest some entrypoint issue? Setting root directory or includes base dir does not resolve the issue.
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 docker-entrypoint.sh and reproduce the documented batch command using the provided *.yaml examples, comparing the Docker invocation with the direct Java command. Trace how the entrypoint passes arguments and confirm that wildcard batch generation works in the container while direct file generation remains successful.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- docker, java
- Domain
- cli, devops
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100