Open leyserai opened 3 months ago
Could you provide a simplified example? Also, why do you use refSchema: = resolveRef (schema. SchemaTypeRef, docModel)
? The library provides a proxy to fetch the schema if it is a reference. I would understand the logic if it was a polymorphic schema (oneOf
, allOf
, anyOf
), but I am missing the example.
hello, When I parse a swagger json, the request body refer to an object, such as #/components/schemas/TeacherAdmitWay, but the SchemaTypeRef in pathItem.Post.RequestBody.Schema is nil.
the attachment is the json file. the code below
In Schema.Build method, the code blow
_, schemaRefLabel, schemaRefNode := utils.FindKeyNodeFullTop(SchemaTypeLabel, root.Content)
SchemaTypeLabel is "$schema", but not found in the json file.attache json file: test.json