OpenAPITools / OpenAPITools/openapi-generator
[BUG] Breaking change in the resolution of relative imports between 4.3.0 and 4.3.1
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?
4.3.0 and 4.3.1 - Have you search for related issues/PRs?
Description
My openapi description is decomposed into many files that reference each other via relative paths. The specification can be processed with v4.3.0 (and lower) successfully but the same fails with v4.3.1
openapi-generator version
The error occurs on v4.3.1. It is a regression since the same worked for v4.3.0 and lower.
OpenAPI declaration file content or url
Please check this repo for a minimal testcase since multiple files are involved:
https://github.com/Carsten-Leue/openapi-import-bug
Command line used for generation
successful command
java -jar openapi-generator-cli-4.3.0.jar generate -g openapi -i openapi/index.json -o out/4.3.0/
unsuccessful command
java -jar openapi-generator-cli-4.3.1.jar generate -g openapi -i openapi/index.json -o out/4.3.1/
Steps to reproduce
Checkout https://github.com/Carsten-Leue/openapi-import-bug and execute the run.bat script
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 minimal reproduction repository linked in the issue and run its run.bat script, comparing generation with openapi-generator-cli 4.3.0 and 4.3.1. Trace the relative-import resolution path responsible for the regression; done means the multi-file OpenAPI description processes successfully on 4.3.1 as it did on 4.3.0.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- api, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100