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

Struct ExampleRef

openapi3/refs.go:157–168  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

155// ExampleRef represents either a Example or a $ref to a Example.
156// When serializing and both fields are set, Ref is preferred over Value.
157type ExampleRef struct {
158 // Extensions only captures fields starting with 'x-' as no other fields
159 // are allowed by the openapi spec.
160 Extensions map[string]any
161 Origin *Origin `json:"-" yaml:"-"`
162
163 Ref string
164 Value *Example
165 extra []string
166
167 refPath *url.URL
168}
169
170var _ jsonpointer.JSONPointable = (*ExampleRef)(nil)
171

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected