MCPcopy Create free account
hub / github.com/getkin/kin-openapi / SchemaRef

Struct SchemaRef

openapi2/refs.go:14–24  ·  view source on GitHub ↗

SchemaRef represents either a Schema or a $ref to a Schema. When serializing and both fields are set, Ref is preferred over Value.

Source from the content-addressed store, hash-verified

12// SchemaRef represents either a Schema or a $ref to a Schema.
13// When serializing and both fields are set, Ref is preferred over Value.
14type SchemaRef struct {
15 // Extensions only captures fields starting with 'x-' as no other fields
16 // are allowed by the openapi spec.
17 Extensions map[string]any
18
19 Ref string
20 Value *Schema
21 extra []string
22
23 refPath *url.URL
24}
25
26var _ jsonpointer.JSONPointable = (*SchemaRef)(nil)
27

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected