Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrUnsupportedFormat = fmt.Errorf("unsupported format. supported formats are: JSON, TypeScripts, Go, Java") ErrEmptyObjectName = fmt.Errorf("object name should be non-zero length") )
View Source
var ErrUnsupportedType = fmt.Errorf("unsupported type")
Functions ¶
Types ¶
type Collection ¶
type Field ¶
type Field struct { Type string `json:"type,omitempty"` Format string `json:"format,omitempty"` Tags []string `json:"tags,omitempty"` Desc string `json:"description,omitempty"` Fields map[string]*Field `json:"properties,omitempty"` Items *Field `json:"items,omitempty"` AutoGenerate bool `json:"autoGenerate,omitempty"` }
Field represents JSON schema object.
type JSONToJava ¶
type JSONToJava struct{}
func (*JSONToJava) GetObjectTemplate ¶
func (*JSONToJava) GetObjectTemplate() string
type JSONToLangType ¶
type JSONToTypeScript ¶
type JSONToTypeScript struct{}
func (*JSONToTypeScript) GetObjectTemplate ¶
func (*JSONToTypeScript) GetObjectTemplate() string
type Schema ¶
type Schema struct { Name string `json:"title,omitempty"` Desc string `json:"description,omitempty"` Fields map[string]*Field `json:"properties,omitempty"` PrimaryKey []string `json:"primary_key,omitempty"` CollectionType string `json:"collection_type,omitempty"` }
Schema is top level JSON schema object.
Click to show internal directories.
Click to hide internal directories.