Versions in this module Expand all Collapse all v1 v1.1.0 Dec 14, 2016 Changes in this version type Generator + API *design.APIDefinition + OutDir string v1.0.0 Aug 2, 2016 Changes in this version + const JSONArray + const JSONBoolean + const JSONFile + const JSONInteger + const JSONNull + const JSONNumber + const JSONObject + const JSONString + const SchemaRef + var Definitions map[string]*JSONSchema + func Generate() (files []string, err error) + func GenerateMediaTypeDefinition(api *design.APIDefinition, mt *design.MediaTypeDefinition, view string) + func GenerateResourceDefinition(api *design.APIDefinition, r *design.ResourceDefinition) + func GenerateTypeDefinition(api *design.APIDefinition, ut *design.UserTypeDefinition) + func MediaTypeRef(api *design.APIDefinition, mt *design.MediaTypeDefinition, view string) string + func TypeRef(api *design.APIDefinition, ut *design.UserTypeDefinition) string + type Generator struct + func (g *Generator) Cleanup() + func (g *Generator) Generate(api *design.APIDefinition) (_ []string, err error) + type JSONLink struct + Description string + EncType string + Href string + MediaType string + Method string + Rel string + Schema *JSONSchema + TargetSchema *JSONSchema + Title string + type JSONMedia struct + BinaryEncoding string + Type string + type JSONSchema struct + AdditionalProperties bool + AnyOf []*JSONSchema + DefaultValue interface{} + Definitions map[string]*JSONSchema + Description string + Enum []interface{} + Example interface{} + Format string + ID string + Items *JSONSchema + Links []*JSONLink + MaxLength *int + Maximum *float64 + Media *JSONMedia + MinLength *int + Minimum *float64 + PathStart string + Pattern string + Properties map[string]*JSONSchema + ReadOnly bool + Ref string + Required []string + Schema string + Title string + Type JSONType + func APISchema(api *design.APIDefinition) *JSONSchema + func NewJSONSchema() *JSONSchema + func TypeSchema(api *design.APIDefinition, t design.DataType) *JSONSchema + func (s *JSONSchema) Dup() *JSONSchema + func (s *JSONSchema) JSON() ([]byte, error) + func (s *JSONSchema) Merge(other *JSONSchema) + type JSONType string