Documentation
¶
Index ¶
- Variables
- func Generate(specification *spec.Spec, jsonlib string, packageName string, ...) *generator.Sources
- func NewTypes(jsonlib string) *types.Types
- type Generator
- type JacksonGenerator
- func (g *JacksonGenerator) CreateJsonHelper(name string) string
- func (g *JacksonGenerator) ErrorModels(httperrors *spec.HttpErrors) []generator.CodeFile
- func (g *JacksonGenerator) JsonHelpers() []generator.CodeFile
- func (g *JacksonGenerator) JsonRead(varJson string, typ *spec.TypeDef) string
- func (g *JacksonGenerator) JsonWrite(varData string, typ *spec.TypeDef) string
- func (g *JacksonGenerator) Models(version *spec.Version) []generator.CodeFile
- func (g *JacksonGenerator) ModelsUsageImports() []string
- func (g *JacksonGenerator) ModelsValidation() *generator.CodeFile
- type MoshiGenerator
- func (g *MoshiGenerator) CreateJsonHelper(name string) string
- func (g *MoshiGenerator) ErrorModels(httperrors *spec.HttpErrors) []generator.CodeFile
- func (g *MoshiGenerator) JsonHelpers() []generator.CodeFile
- func (g *MoshiGenerator) JsonRead(varJson string, typ *spec.TypeDef) string
- func (g *MoshiGenerator) JsonWrite(varData string, typ *spec.TypeDef) string
- func (g *MoshiGenerator) Models(version *spec.Version) []generator.CodeFile
- func (g *MoshiGenerator) ModelsUsageImports() []string
- func (g *MoshiGenerator) ModelsValidation() *generator.CodeFile
- type Packages
Constants ¶
This section is empty.
Variables ¶
View Source
var Jackson = "jackson"
View Source
var Moshi = "moshi"
Functions ¶
Types ¶
type Generator ¶
type Generator interface { Models(version *spec.Version) []generator.CodeFile ErrorModels(httperrors *spec.HttpErrors) []generator.CodeFile ModelsUsageImports() []string ModelsValidation() *generator.CodeFile JsonRead(varJson string, typ *spec.TypeDef) string JsonWrite(varData string, typ *spec.TypeDef) string JsonHelpers() []generator.CodeFile CreateJsonHelper(name string) string }
func NewGenerator ¶
type JacksonGenerator ¶
func NewJacksonGenerator ¶
func NewJacksonGenerator(types *types.Types, packages *Packages) *JacksonGenerator
func (*JacksonGenerator) CreateJsonHelper ¶
func (g *JacksonGenerator) CreateJsonHelper(name string) string
func (*JacksonGenerator) ErrorModels ¶ added in v2.1.2134
func (g *JacksonGenerator) ErrorModels(httperrors *spec.HttpErrors) []generator.CodeFile
func (*JacksonGenerator) JsonHelpers ¶ added in v2.1.2134
func (g *JacksonGenerator) JsonHelpers() []generator.CodeFile
func (*JacksonGenerator) JsonRead ¶
func (g *JacksonGenerator) JsonRead(varJson string, typ *spec.TypeDef) string
func (*JacksonGenerator) JsonWrite ¶
func (g *JacksonGenerator) JsonWrite(varData string, typ *spec.TypeDef) string
func (*JacksonGenerator) Models ¶
func (g *JacksonGenerator) Models(version *spec.Version) []generator.CodeFile
func (*JacksonGenerator) ModelsUsageImports ¶
func (g *JacksonGenerator) ModelsUsageImports() []string
func (*JacksonGenerator) ModelsValidation ¶ added in v2.1.2134
func (g *JacksonGenerator) ModelsValidation() *generator.CodeFile
type MoshiGenerator ¶
type MoshiGenerator struct { Types *types.Types Packages *Packages // contains filtered or unexported fields }
func NewMoshiGenerator ¶
func NewMoshiGenerator(types *types.Types, packages *Packages) *MoshiGenerator
func (*MoshiGenerator) CreateJsonHelper ¶
func (g *MoshiGenerator) CreateJsonHelper(name string) string
func (*MoshiGenerator) ErrorModels ¶ added in v2.1.2134
func (g *MoshiGenerator) ErrorModels(httperrors *spec.HttpErrors) []generator.CodeFile
func (*MoshiGenerator) JsonHelpers ¶ added in v2.1.2134
func (g *MoshiGenerator) JsonHelpers() []generator.CodeFile
func (*MoshiGenerator) JsonRead ¶
func (g *MoshiGenerator) JsonRead(varJson string, typ *spec.TypeDef) string
func (*MoshiGenerator) JsonWrite ¶
func (g *MoshiGenerator) JsonWrite(varData string, typ *spec.TypeDef) string
func (*MoshiGenerator) Models ¶
func (g *MoshiGenerator) Models(version *spec.Version) []generator.CodeFile
func (*MoshiGenerator) ModelsUsageImports ¶
func (g *MoshiGenerator) ModelsUsageImports() []string
func (*MoshiGenerator) ModelsValidation ¶ added in v2.1.2134
func (g *MoshiGenerator) ModelsValidation() *generator.CodeFile
Click to show internal directories.
Click to hide internal directories.