Documentation ¶
Index ¶
- func Decode(input map[string]interface{}, obj interface{}) error
- func DecodeString(input string, obj interface{}) error
- func GetKey(input map[string]interface{}, key string) (interface{}, bool)
- func ReadByTag(obj interface{}, target string) []string
- func ValidateRequired(input map[string]interface{}, obj interface{}) error
- type Array
- type Field
- type Map
- type Record
- type ScalarType
- type Schema
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeString ¶
DecodeString decodes a string into an object
func ValidateRequired ¶ added in v0.1.2
Types ¶
type Field ¶
type Field struct { Type Type // Computed describes whether the field is a status Computed bool // Required specifies if the field is required Required bool }
Field is a field in a record
type Record ¶
Record is an object with several values
func (*Record) OpenAPIV3 ¶
func (s *Record) OpenAPIV3() interface{}
OpenAPIV3 returns the OpenApi v3 representation of the schema
func (*Record) OpenAPIV3JSON ¶
OpenAPIV3JSON creates the OpenAPIv3 spec for the Schema in JSON format
func (*Record) OpenAPIV3Yaml ¶
OpenAPIV3Yaml creates the OpenAPIv3 spec for the Schema in YAML format
type ScalarType ¶
type ScalarType int
ScalarType is a scalar type
const ( // TypeString is a string type TypeString ScalarType = iota // TypeInt is a int type TypeInt // TypeBool is a bool type TypeBool )
func (ScalarType) String ¶
func (i ScalarType) String() string
type Schema ¶
Schema is an OpenAPIv3 schema of a resource
func GenerateSchema ¶
GenerateSchema generates an OpenAPIv3 schema
Click to show internal directories.
Click to hide internal directories.