Documentation ¶
Index ¶
- Variables
- func Generate(specification *spec.Spec, jsonlib string, packageName string, ...) *sources.Sources
- func NewTypes(jsonlib string) *types.Types
- type Generator
- type JacksonGenerator
- func (g *JacksonGenerator) CreateJsonMapperField() string
- func (g *JacksonGenerator) InitJsonMapper(w *sources.Writer)
- func (g *JacksonGenerator) JsonImports() []string
- func (g *JacksonGenerator) ReadJson(varJson string, typ *spec.TypeDef) (string, string)
- func (g *JacksonGenerator) SetupImport(jsonPackage modules.Module) string
- func (g *JacksonGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
- func (g *JacksonGenerator) VersionModels(version *spec.Version, thePackage modules.Module, jsonPackage modules.Module) []sources.CodeFile
- func (g *JacksonGenerator) WriteJson(varData string, typ *spec.TypeDef) (string, string)
- type MoshiGenerator
- func (g *MoshiGenerator) CreateJsonMapperField() string
- func (g *MoshiGenerator) InitJsonMapper(w *sources.Writer)
- func (g *MoshiGenerator) JsonImports() []string
- func (g *MoshiGenerator) ReadJson(varJson string, typ *spec.TypeDef) (string, string)
- func (g *MoshiGenerator) SetupImport(jsonPackage modules.Module) string
- func (g *MoshiGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
- func (g *MoshiGenerator) VersionModels(version *spec.Version, thePackage modules.Module, jsonPackage modules.Module) []sources.CodeFile
- func (g *MoshiGenerator) WriteJson(varData string, typ *spec.TypeDef) (string, string)
Constants ¶
This section is empty.
Variables ¶
View Source
var Jackson = "jackson"
View Source
var Moshi = "moshi"
Functions ¶
Types ¶
type Generator ¶
type Generator interface { SetupLibrary(thePackage modules.Module) []sources.CodeFile SetupImport(jsonPackage modules.Module) string VersionModels(version *spec.Version, thePackage modules.Module, jsonPackage modules.Module) []sources.CodeFile ReadJson(jsonStr string, typ *spec.TypeDef) (string, string) WriteJson(varData string, typ *spec.TypeDef) (string, string) CreateJsonMapperField() string InitJsonMapper(w *sources.Writer) JsonImports() []string }
func NewGenerator ¶
type JacksonGenerator ¶
func NewJacksonGenerator ¶
func NewJacksonGenerator(types *types.Types) *JacksonGenerator
func (*JacksonGenerator) CreateJsonMapperField ¶ added in v2.1.1587
func (g *JacksonGenerator) CreateJsonMapperField() string
func (*JacksonGenerator) InitJsonMapper ¶
func (g *JacksonGenerator) InitJsonMapper(w *sources.Writer)
func (*JacksonGenerator) JsonImports ¶
func (g *JacksonGenerator) JsonImports() []string
func (*JacksonGenerator) SetupImport ¶
func (g *JacksonGenerator) SetupImport(jsonPackage modules.Module) string
func (*JacksonGenerator) SetupLibrary ¶
func (g *JacksonGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
func (*JacksonGenerator) VersionModels ¶
type MoshiGenerator ¶
func NewMoshiGenerator ¶
func NewMoshiGenerator(types *types.Types) *MoshiGenerator
func (*MoshiGenerator) CreateJsonMapperField ¶ added in v2.1.1587
func (g *MoshiGenerator) CreateJsonMapperField() string
func (*MoshiGenerator) InitJsonMapper ¶
func (g *MoshiGenerator) InitJsonMapper(w *sources.Writer)
func (*MoshiGenerator) JsonImports ¶
func (g *MoshiGenerator) JsonImports() []string
func (*MoshiGenerator) SetupImport ¶
func (g *MoshiGenerator) SetupImport(jsonPackage modules.Module) string
func (*MoshiGenerator) SetupLibrary ¶
func (g *MoshiGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
func (*MoshiGenerator) VersionModels ¶
Click to show internal directories.
Click to hide internal directories.