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:
schemas:
UserStruct:
title: "A User"
type: object
properties:
struct:
$ref: "#/components/schemas/StructVersionV1"
data:
$ref: "#/components/schemas/UserV1"
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?
I'm seeing an error:
bad data in "#/components/schemas/UserStruct"when calling
openapi3.NewLoader().LoadFromFile(path)This is being emitted from
openapi3/loader.goL358 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?