-
Notifications
You must be signed in to change notification settings - Fork 39
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.4.0 fails to resolve refs to files #2014
Labels
Comments
fhamelin-1a
changed the title
[Bug]: openapitools 7.4.0 fails to resolve refs to files
[Bug]: openapi-generator 7.4.0 fails to resolve refs to files
Jul 31, 2024
This seems to be a regression linked to #1572 We need to discuss to find a proper fix |
github-merge-queue bot
pushed a commit
that referenced
this issue
Aug 23, 2024
## Proposed change When we copy the spec file before generating the SDK we are breaking the local relative paths referenced in the file. The proposed change is to copy all the referenced files inside the SDK in a folder `./spec-local-references/` to have them versioned. We also update the local references in the spec to look for these files. ## Related issues - 🐛 Fixes #2014 - 🚀 Feature #(issue) <!-- Please make sure to follow the contributing guidelines on https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
cpaulve-1A
added a commit
that referenced
this issue
Aug 27, 2024
## Proposed change Cherry Pick fix of #2046 ## Related issues - 🐛 Fixes #2014 <!-- Please make sure to follow the contributing guidelines on https://github.com/amadeus-digital/Otter/blob/main/CONTRIBUTING.md -->
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Package name
schematics
Package version
11.0.1
Reproduction steps
You can ask me in Teams and I'll provide a reproduction .zip
Step 1: create models
Step 2: Manually modify
pet-specs-split.yaml
Modify the
paths./pet.post.responses.'200'
to point to acomponents.response
ok-pet
:Create the
components.response
ok-pet
:In
pet-response.yaml
, modify the refs to point topet-specs-split.yaml#/components
. Also add a title:Step 3: generate SDKs for version 9.6.x and 11.0.x
Note: I had troubles with
--spec-path
and--generator-key
on v11 and had to manually modify the scripts inpackage.json
.Also, I've duplicated the
spec:regen
script so that it targets both split & untouched specs:Current result
npm run spec:regen:untouched
works for both v9 and v11npm run spec:regen:split
works for v9npm run spec:regen:split
fails for v11 with below exceptionExpected result
npm run spec:regen:split
should work on v11 (and v10 which I haven't tried)Additional comments
11.0.14.1-jbr
7.4.0
. Tried to upgrade to openapi-generator7.7.0
but same issue6.6.0
typescriptFetch-openapi-generator.jar
for7.7.0
, I had to modify the fileAbstractTypeScriptClientCodegen
because they moved thegetSchemaItems
method toModelUtils
(see DefaultCodegen.java). Note that the exception above has warnings forModelUtils
, so it could be related.[BUG] openapi-generator 7.2.0 is no longer able to resolve local $refs OpenAPITools/openapi-generator#17554
[BUG] openapi-generator 7.5.0 is no longer able to resolve local $refs OpenAPITools/openapi-generator#18429
The text was updated successfully, but these errors were encountered: