Documentation ¶
Index ¶
- func CollectDefinitions(s []byte, confDefs map[string]*ajson.Node, filter FilterFunction) error
- func CreateSchema(m interface{}) (jsonschema.Schema, error)
- func CreateSchemaAndData(m interface{}) ([]byte, []byte, error)
- func GetBool(param string, v *ajson.Node) (bool, bool)
- func GetDefinitionName(t reflect.Type) string
- func GetInt(param string, v *ajson.Node) (int, bool)
- func GetStr(param string, v *ajson.Node) (string, bool)
- func SetBool(param string, val bool, v *ajson.Node) error
- func SetInt(param string, val int, v *ajson.Node) error
- func SetStr(param string, val string, v *ajson.Node) error
- func UpdateWithDefinitions(realSchema []byte, configurableDefinitionNodes map[string]*ajson.Node) ([]byte, error)
- type FilterFunction
- type Processor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CollectDefinitions ¶ added in v0.1.83
func CreateSchema ¶
func CreateSchema(m interface{}) (jsonschema.Schema, error)
func CreateSchemaAndData ¶ added in v0.1.35
func GetDefinitionName ¶ added in v0.1.78
func UpdateWithDefinitions ¶ added in v0.1.83
func UpdateWithDefinitions(realSchema []byte, configurableDefinitionNodes map[string]*ajson.Node) ([]byte, error)
UpdateWithDefinitions parses schema and update all definitions in it by using map of ajson.nodes definitions replacing preserves path and configurable properties
Types ¶
type FilterFunction ¶ added in v0.1.84
var FilterConfigurable FilterFunction = func(node *ajson.Node) bool { configurable, _ := GetBool("configurable", node) return configurable }
GetBool("shared", node) return configurable }configurable, _ :=
Click to show internal directories.
Click to hide internal directories.