Documentation ¶
Index ¶
- Constants
- Variables
- func IntFmtProperty(format string) *spec.Schema
- func IsDynamicInterface(t reflect.Type) bool
- func ObjectProperty() *spec.Schema
- func ObjectPropertyProperties(properties spec.SchemaProperties) *spec.Schema
- func TypeName(t reflect.Type) string
- type Builder
- type InterfaceBuildOption
- type SchemaBuildFunc
Constants ¶
View Source
const DefinitionsRoot = "#/definitions/"
Variables ¶
View Source
var ( DefaultDefinitions = map[string]spec.Schema{} DefaultBuilder = NewBuilder(InterfaceBuildOptionOverride, DefaultDefinitions) )
Functions ¶
func IntFmtProperty ¶
StrFmtProperty creates a property for the named string format
func IsDynamicInterface ¶
func ObjectProperty ¶
func ObjectPropertyProperties ¶
func ObjectPropertyProperties(properties spec.SchemaProperties) *spec.Schema
Types ¶
type Builder ¶
type Builder struct { InterfaceBuildOption InterfaceBuildOption Definitions map[string]spec.Schema }
func NewBuilder ¶
func NewBuilder(interfaceOption InterfaceBuildOption, definations map[string]spec.Schema) *Builder
type InterfaceBuildOption ¶
type InterfaceBuildOption string
const ( InterfaceBuildOptionDefault InterfaceBuildOption = "" // default as an 'object{}' InterfaceBuildOptionOverride InterfaceBuildOption = "override" // override using interface's value if exist InterfaceBuildOptionIgnore InterfaceBuildOption = "ignore" // ignore interface field InterfaceBuildOptionMerge InterfaceBuildOption = "merge" // anyOf 'object{}' type and interface's value type )
Click to show internal directories.
Click to hide internal directories.