-
Notifications
You must be signed in to change notification settings - Fork 1
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
References in referenced files not resolved #15
Comments
Local refs in refd schemas were resolved relative to top level schema. Expected behavior is to resolve them relative to refd schema. Refs: #15
Local refs in refd schemas were resolved relative to top level schema. Expected behavior is to resolve them relative to refd schema. Refs: #15
@mtrimolet So I just checked into this again after having worked around it in the past. It turns out that the fix was not actually successful. I added a broken test in the new PR to demonstrate. |
@mtrimolet FWIW, I may have made an error of communication in the original report here. I might have given you the impression that the above example, and more or less exactly the above example, was my actual use case. Therefore, if your fix caused the above example to work, the issue was solved. If so, this was a mistake on my part. The above example was just a simple way to demonstrate the references were not being resolved correctly. This is why I suggested solving the problem with |
suppose I have two files
This is valid according to swagger-cli. However, if I run
oapi2ts
I getHowever, if I change the definition of
Thing
toIt works correctly.
It almost seems as if the references are being resolved with respect to the original file they are given.
I can see that it might be very difficult to fix this issue with your current setup (which might require a stack of contexts or something equally awful). One option might be to look at using SwaggerParser.bundle at the beginning of execution to prevent this issue from arising.
The text was updated successfully, but these errors were encountered: