-
-
Notifications
You must be signed in to change notification settings - Fork 6.6k
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.2.0 is no longer able to resolve local $refs #17554
Comments
There is work in progress (swagger-api/swagger-parser#2030) that is based on the PR that I suspect introduced the changed (swagger-api/swagger-parser#1994): If 1994 included local file reference tests this regression may have been caught. Perhaps 2030 could add such a test. |
It look like we have the same problem with version 7.2.0. Schemes located in the same file thats describing the operation are no longer visible to the parser:
Our specification: https://github.com/yandex-market/yandex-market-partner-api Everything was fine in version 7.1.0 |
I've created an issue in swagger-parser repo about this bug |
This was fixed in 7.3.0 by reverting the swagger-parser upgrade. A Go test was added to attempt to catch similar issues caused by parser upgrades in the future. |
Bug Report Checklist
Description
We are attempting to upgrade our SDK generation process from openapi-generator 7.1.0 to 7.2.0, but 7.2.0 fails to find most of our OpenAPI spec; the output is littered with errors like this:
The only change we're making is the openapi-generator version, so the files still exist in the same location; 7.1.0 is able to find them but 7.2.0 isn't. After some poking it appears the issue is caused by the upgrade from swagger-parser 2.1.18 to 2.1.19.
openapi-generator version
OpenAPI declaration file content or url
Generation Details
I haven't had a chance to create a smaller reproduction case, but our upgrade attempt is here: equinix/equinix-sdk-go#15
Steps to reproduce
Check out the PR linked above and run
make -f Makefile.metalv1 generate
.Related issues/PRs
Suggest a fix
I haven't identified the specific change in swagger-parser 2.1.19 that caused this bug, so there is currently no way to fix the bug by upgrading. In the meantime, downgrading swagger-parser to 2.1.18 would fix this bug.
The text was updated successfully, but these errors were encountered: