-
-
Notifications
You must be signed in to change notification settings - Fork 766
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
json_schema
resolve_refs
throws a confusing error
#1897
Comments
Greetings, are you still having this issue? I just opened a separate issue that seems related: #1909 |
Hi, I logged this as an issue but never looked back. If you're curious you should be able to replicate my issue and check if it still exists. |
Apologies, I didn't read this one well enough. Makes complete sense now. Thanks! |
The full error thrown is
which does indicate that this is related to ref resolution in the json schema. There is also a stacktrace providing even more information. While I agree that the error could be improved and would accept a PR, this is not a priority. |
Description
I had accidentally put
$ref: "string"
instead oftype: string
in myopenapi.yaml
.This resulted in the confusing error
No such file or directory: '/my/local/directory/configs/string'
Expected behaviour
I would have liked a clear error message that instructed me to take a look at my
openapi.yaml
.Actual behaviour
Instead I went on a deep dive to follow the logic to see where "openapi.yaml" got turned into string.
I though it was likely that some package had been updated and some bug replaced the actual filename with
type(filename)
, resulting instring
.Steps to reproduce
Create a connexion app and include
$ref: "string"
in youropenapi.yaml
file.I believe it doesn't really matter where or how since everything get recursively parsed/resolved.
I'm using spec version
3.0.3
Additional info:
Output of the commands:
python --version
Python 3.11.8
Also occurs on 3.10, probably not related to python version.
pip show connexion | grep "^Version\:"
Version: 3.0.6
The text was updated successfully, but these errors were encountered: