OpenAPITools / OpenAPITools/openapi-generator
[BUG] openapi-generator-maven-plugin fails to read schema from the classpath
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
openapi-generator-maven-plugin fails to read schema from the classpath
openapi-generator version
3.3.4
4.0.x should have the same issue
OpenAPI declaration file content or url
n/a (see Steps to reproduce
Command line used for generation
n/a (see Steps to reproduce)
Steps to reproduce
I added modules/openapi-generator-maven-plugin/examples/multi-module in my fork repository.
Test fails in 3.3.4 (rev 4606f7711c), The problem is fixed in rev c8e8784c2d.
git clone https://github.com/vtitov/openapi-generator.git openapi-generator-multi-module && \
cd openapi-generator-multi-module && \
(git checkout 4606f7711c && \
cd modules/openapi-generator-maven-plugin/examples/multi-module && \
mvn clean package) || \
(git checkout c8e8784c2d && \
mvn clean install -pl '!modules/openapi-generator-gradle-plugin' -DskipTests -Dmaven.javadoc.skip && \
cd modules/openapi-generator-maven-plugin/examples/multi-module && \
mvn clean package)
Related issues/PRs
n/a
Suggest a fix
find a fix here:
https://github.com/vtitov/openapi-generator/tree/3.3.x
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 in modules/openapi-generator-maven-plugin/examples/multi-module and run the provided Maven reproduction at revision 4606f7711c. Compare it with revision c8e8784c2d and inspect the classpath schema-loading behavior in the Maven plugin. Done means mvn clean package succeeds for the multi-module example at the affected revision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java, openapi
- Domain
- api, build-system
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 35/100