Versions in this module Expand all Collapse all v0 v0.0.2 Dec 12, 2022 Changes in this version + func CapitaliseFirstLetter(s string) string + func Contains(s []string, e string) bool + func GetGolangName(s string) string + func GetOrderedFieldNames(m map[string]*Field) []string + func GetOrderedStructNames(m map[string]*Struct) []string + func IsNotAGoNameCharacter(r rune) bool + func LineAndCharacter(bytes []byte, offset int) (line int, character int, err error) + func Output(w io.Writer, g *Generator, pkg string, originatingPaths []string, debug bool) error + type AdditionalProperties Schema + func (ap *AdditionalProperties) UnmarshalJSON(data []byte) error + type Field struct + Descriptions []string + Id string + JSONName string + Name string + Required bool + Type *TypeInfo + func NewField(name, jsonName string, info *TypeInfo, required bool, descriptions []string) *Field + type Generator struct + Aliases map[string]*Field + Structs map[string]*Struct + func New(schemas ...*Schema) *Generator + func (g *Generator) CreateTypes() (err error) + type RefResolver struct + func NewRefResolver(schemas []*Schema) *RefResolver + func (r *RefResolver) GetPath(schema *Schema) string + func (r *RefResolver) GetSchemaByReference(schema *Schema) (*Schema, error) + func (r *RefResolver) Init() error + func (r *RefResolver) InsertURI(uri string, schema *Schema) error + type Schema struct + AdditionalProperties *AdditionalProperties + AdditionalPropertiesBool *bool + AllOf []*Schema + AnyOf []*Schema + Default interface{} + Definitions map[string]*Schema + Description string + Examples []interface{} + GeneratedType *TypeInfo + ID04 string + ID06 string + Items *Schema + JSONKey string + NameCount int + OneOf []*Schema + Parent *Schema + PathElement string + Properties map[string]*Schema + Reference string + Required []string + SchemaType string + Title string + TypeValue interface{} + func Parse(schema string, uri *url.URL) (*Schema, error) + func ParseWithSchemaKeyRequired(schema string, uri *url.URL, schemaKeyRequired bool) (*Schema, error) + func ReadInputFiles(inputFiles []string, schemaKeyRequired bool) ([]*Schema, error) + func (schema *Schema) FixMissingTypeValue() + func (schema *Schema) GetRoot() *Schema + func (schema *Schema) ID() string + func (schema *Schema) Init() + func (schema *Schema) IsRoot() bool + func (schema *Schema) MultiType() ([]string, bool) + func (schema *Schema) Type() (firstOrDefault string, multiple bool) + type Struct struct + AdditionalType *TypeInfo + Description string + Fields map[string]*Field + GenerateCode bool + ID string + TypeInfo *TypeInfo + type TypeInfo struct + Id string + IsPointer bool + Name string + PrimitiveType string + SubType *TypeInfo + func NewTypeInfo(name string, primitiveType string, isPointer bool, subType *TypeInfo) *TypeInfo + func (p *TypeInfo) AddAliasFor(name string) + func (p *TypeInfo) AddFieldReference(f *Field) + func (p *TypeInfo) GetTypeAsString() string + func (p *TypeInfo) IsAlias() bool + func (p *TypeInfo) LongName() string + func (p *TypeInfo) RemoveFieldReference(f *Field) bool + func (p *TypeInfo) Replaces(old *TypeInfo) + func (p *TypeInfo) ShortName() string + func (p *TypeInfo) String() string