Documentation ¶
Index ¶
- Variables
- func GenerateErrors(w io.Writer, errorsRaw []byte)
- func GenerateMethods(w, wTest io.Writer, methodsRaw []byte)
- func GenerateObjects(w, testW io.Writer, objectsRaw []byte)
- func GenerateVersion(w io.Writer, packageRaw []byte)
- type AllOf
- type Coder
- type Enum
- type Error
- type ErrorJSON
- type Errors
- type ErrorsFile
- type Genner
- type GennerWithTest
- type Limits
- type Method
- type MethodJSON
- type MethodsFile
- type NameGennerWithTest
- type NameNestedGenner
- type Namer
- type NestedGenner
- type Object
- type ObjectsFile
- type OneOf
- type PackageFile
- type Param
- type ParamNameNestedGenner
- type Parameter
- type Property
- type RefType
- type SetField
- type SimpleType
- type Subcode
- type SubcodeJSON
- type Subcodes
Constants ¶
This section is empty.
Variables ¶
View Source
var SimpleReferences = make(map[string]RefType)
Functions ¶
func GenerateErrors ¶
func GenerateMethods ¶
func GenerateObjects ¶
func GenerateVersion ¶
Types ¶
type AllOf ¶
type AllOf struct { Name string Description string Fields []NestedGenner ArrayNestingLevel int // fields for nested AllOf IsRequired bool }
type Enum ¶
type Error ¶
type ErrorsFile ¶
type ErrorsFile struct { Definitions struct { Subcodes map[string]SubcodeJSON `json:"subcodes"` } `json:"definitions"` Errors map[string]ErrorJSON }
type GennerWithTest ¶
type Limits ¶
type Method ¶
type MethodJSON ¶
type MethodsFile ¶
type MethodsFile struct {
Methods []MethodJSON `json:"methods"`
}
type NameGennerWithTest ¶
type NameGennerWithTest interface { Namer GennerWithTest }
type NameNestedGenner ¶
type NameNestedGenner interface { Namer NestedGenner }
type NestedGenner ¶
type NestedGenner interface {
// contains filtered or unexported methods
}
type Object ¶
type Object struct { Name string Description string Fields []NameNestedGenner ArrayNestingLevel int // fields for nested Object IsRequired bool }
type ObjectsFile ¶
type OneOf ¶
type OneOf struct { Name string Description string Fields []NestedGenner ArrayNestingLevel int // fields for nested OneOf IsRequired bool // contains filtered or unexported fields }
type PackageFile ¶
type PackageFile struct {
Version string `json:"version"`
}
type ParamNameNestedGenner ¶
type ParamNameNestedGenner interface { NameNestedGenner Param() Param }
type Property ¶
type Property struct { Type *interface{} `json:"type"` Description *string `json:"description"` Required *bool `json:"required"` Limits Ref *string `json:"$ref"` Enum *[]interface{} `json:"enum"` EnumNames *[]string `json:"enumNames"` // type == array Items *Property `json:"items"` // type == object PatternProperties *map[string]map[string]string `json:"patternProperties"` Properties *map[string]Property `json:"properties"` AllOf *[]Property `json:"allOf"` OneOf *[]Property `json:"oneOf"` }
type SimpleType ¶
type SimpleType struct { Name string Description string Type string Limits Limits ArrayNestingLevel int IsRequired bool // contains filtered or unexported fields }
func (SimpleType) Gen ¶
func (t SimpleType) Gen() (gen string)
func (SimpleType) GetName ¶
func (t SimpleType) GetName() string
func (SimpleType) Param ¶
func (t SimpleType) Param() (p Param)
func (SimpleType) TestGen ¶
func (t SimpleType) TestGen() (testGen string)
type SubcodeJSON ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.