Documentation ¶
Overview ¶
Package schema implements JSON schema serialization and code generation.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONSchema ¶
type JSONSchema struct { Title string `json:"title"` Type string `json:"type"` Properties map[string]JSONSchemaProperty `json:"properties"` Required []string `json:"required"` Definitions map[string]JSONSchema `json:"definitions"` }
type JSONSchemaProperty ¶
type JSONSchemaProperty struct { Type string `json:"type"` Format string `json:"format,omitempty"` Default string `json:"default,omitempty"` Ref string `json:"$ref,omitempty"` Items *JSONSchemaProperty `json:"items"` }
type JSONSchemaToSwiftCodeGenerator ¶
type JSONSchemaToSwiftCodeGenerator struct {
Schema JSONSchema
}
func (*JSONSchemaToSwiftCodeGenerator) Generate ¶
func (g *JSONSchemaToSwiftCodeGenerator) Generate() (string, error)
Generate recursively processes referenced schemas.
Click to show internal directories.
Click to hide internal directories.