-
-
Notifications
You must be signed in to change notification settings - Fork 432
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
Loader fails to load file with no reason #759
Comments
Hello! Can you provide a YML that reproduces the error with a call such as
|
I'd appreciate you deleting it once you have it locally. Thanks |
Not seeing this yet. Needs a new tag? v0.113.1 perhaps? |
Yes I haven't tagged yet. I'm looking to get another PR in first but it can probably wait. I'll tag later today. This will just change the error message you are getting though. Your issue is that the ref points to a schema instead of a response object. I'm not sure why other tools did not point that out though. |
Ah Ha! Found it - yes - correct. Thanks for that. Hopefully your new messaging will point the error at the wrong ref, not the ref definition itself. Look forward to seeing it. Thanks for your help. |
I'm seeing an error:
bad data in "#/components/schemas/UserStruct"
when calling
openapi3.NewLoader().LoadFromFile(path)
This is being emitted from
openapi3/loader.go
L358 which is the default case in a switch statement, and no reason is given.Dumping the reflect values gives:
reflect.TypeOf(cursor).Kind().String == ptr
reflect.TypeOf(cursor).String() == *openapi3.SchemaRef
which I can see for all other schema components as well
The particular component is:
All referenced schemas are in the file and the entire yaml schema validates at https://app.swaggerhub.com
lib version is: github.com/getkin/kin-openapi v0.113.0
Any ideas why this might be happening?
The text was updated successfully, but these errors were encountered: