Open lorthirk opened 4 years ago
👍 Thanks for opening this issue! 🏷 I have applied any labels matching special text in your issue.
The team will review the labels and make any necessary changes.
OpenAPI-Generator is relying on Swagger-Parser. If they have an issue (which seems to be the case), then there is nothing we can do.
You need to work on a solution for the issue in the Upstream project, then we can see how to integrate it.
I see. As you can see, I already linked an issue on their side. Thanks anyway!
Could it be that this issue is resolved in Swagger-Parser now (https://github.com/swagger-api/swagger-parser/pull/1343), and updating the pom to refer to swagger-parser-version 2.0.18 would import that fix here.
@jhellingman it looks like swagger-api/swagger-parser#1343 has been merged on March, 20th while 2.0.18 has been released on February, 23rd. Are you sure that that version would include that fix?
Not sure, but in that case we may have to wait for 2.0.19.
Having the same problem myself. Seems like 2.0.19 is out, should that fix this issue if it's added to openapi-generator?
Any update on this? I'm still experiencing this issue with version 5.0.1
5.2.0 same problem :(
Any news on this issue?
Hi, Any news on this topic. I ran into the same problems in 5.4.0. Is there any progress or features planned for this problem ?
Also ran into this issue on 6.0.1 using the java-camel
generator.
Hi, Is there some news ? I'm still experienced that in 7.3.0...
Bug Report Checklist
Description
I have a spec with multiple references to external files and directories. It looks like that all the references are treated as relative to the main
openapi.yaml
instead of being treated as related to the actual file who holds the referenceopenapi-generator version
4.1.1 (installed from Brew)
OpenAPI declaration file content or url
https://github.com/lorthirk/kapua-openapi
Command line used for generation
openapi-generator generate -c openapi-generator.config.json -i openapi.yaml -g java
content of openapi-generator.config.json:
Steps to reproduce
launch
openapi-generator
as described aboveCommand output:
Related issues/PRs
2412 seems similar
swagger-api/swagger-parser#1074
Suggest a fix
I guess the references should always be resolved starting from the file who holds the
$ref
... Unfortunately I don't know exactly where in the code the references are resolved (inswagger-parser
maybe?).