Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] openapi-generator 7.5.0 is no longer able to resolve local $refs #18429

Closed
6 tasks
ctreatma opened this issue Apr 18, 2024 · 1 comment · Fixed by #18436
Closed
6 tasks

[BUG] openapi-generator 7.5.0 is no longer able to resolve local $refs #18429

ctreatma opened this issue Apr 18, 2024 · 1 comment · Fixed by #18436

Comments

@ctreatma
Copy link
Contributor

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

In openapi-generator 7.5.0, swagger-parser was upgraded to 2.1.19. The same upgrade was done previously in openapi-generator 7.2.0 where it broke the generator's ability to resolve relative refs: #17554.

The behavior described in the linked issue for 7.2.0 has been reintroduced in 7.5.0. At some point, tests were added in an attempt to protect against breaking changes in parser upgrades, but those tests either didn't run or they didn't fail.

openapi-generator version
OpenAPI declaration file content or url
Generation Details
Steps to reproduce
Related issues/PRs
Suggest a fix

Previously the swagger-parser upgrade was reverted. There are now a couple swagger-parser releases after 2.1.19 (the latest release is 2.1.22) and it's possible one of those releases includes a fix for the ref resolution issue, but if the tests that cover parser upgrades aren't working, it's harder to tell if the upstream issue was fixed.

@wing328
Copy link
Member

wing328 commented Apr 19, 2024

sorry for the regression. not sure why the test didn't catch it

can you please build the project locally (mvn clean package) with swagger parser 2.1.22 and see if it works for you locally?

enelir added a commit to nordic-institute/X-Road that referenced this issue Apr 23, 2024
enelir added a commit to nordic-institute/X-Road that referenced this issue Apr 25, 2024
enelir added a commit to nordic-institute/X-Road that referenced this issue Apr 25, 2024
…2 updates (#2128)

* build(deps): bump the java-minor-patch group across 1 directory with 2 updates

Bumps the java-minor-patch group with 2 updates in the /src directory: [org.wiremock:wiremock-standalone](https://github.com/wiremock/wiremock) and org.openapi.generator.


Updates `org.wiremock:wiremock-standalone` from 3.5.3 to 3.5.4
- [Release notes](https://github.com/wiremock/wiremock/releases)
- [Commits](wiremock/wiremock@3.5.3...3.5.4)

Updates `org.openapi.generator` from 7.4.0 to 7.5.0

---
updated-dependencies:
- dependency-name: org.wiremock:wiremock-standalone
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: java-minor-patch
- dependency-name: org.openapi.generator
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: java-minor-patch
...

Signed-off-by: dependabot[bot] <[email protected]>

* fix: revert openapi-generator 7.5.0 to 7.4.0

because bug OpenAPITools/openapi-generator#18429

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Eneli Reimets <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants