Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type RefCallbackFunc ¶
var RefCallbackNoop RefCallbackFunc = func(ref *spec.Ref) *spec.Ref {
return ref
}
type SchemaCallbackFunc ¶
var SchemaCallBackNoop SchemaCallbackFunc = func(schema *spec.Schema) *spec.Schema {
return schema
}
type Walker ¶
type Walker struct { // SchemaCallback will be called on each schema, taking the original schema, // and before any other callbacks of the Walker. // If the schema needs to be mutated, DO NOT mutate it in-place, // always create a copy, mutate, and return it. SchemaCallback func(schema *spec.Schema) *spec.Schema // RefCallback will be called on each ref. // If the ref needs to be mutated, DO NOT mutate it in-place, // always create a copy, mutate, and return it. RefCallback func(ref *spec.Ref) *spec.Ref }
Walker runs callback functions on all references of an OpenAPI spec, replacing the values when visiting corresponding types.
Click to show internal directories.
Click to hide internal directories.