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) CreateJsonMapperVar(w *sources.Writer)
- 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) CreateJsonMapperVar(w *sources.Writer)
- 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 ¶ added in v2.1.1444
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) CreateJsonMapperVar(w *sources.Writer) InitJsonMapper(w *sources.Writer) JsonImports() []string }
func NewGenerator ¶ added in v2.1.1444
type JacksonGenerator ¶ added in v2.1.1444
func NewJacksonGenerator ¶ added in v2.1.1444
func NewJacksonGenerator(types *types.Types) *JacksonGenerator
func (*JacksonGenerator) CreateJsonMapperVar ¶ added in v2.1.1535
func (g *JacksonGenerator) CreateJsonMapperVar(w *sources.Writer)
func (*JacksonGenerator) InitJsonMapper ¶ added in v2.1.1444
func (g *JacksonGenerator) InitJsonMapper(w *sources.Writer)
func (*JacksonGenerator) JsonImports ¶ added in v2.1.1444
func (g *JacksonGenerator) JsonImports() []string
func (*JacksonGenerator) SetupImport ¶ added in v2.1.1535
func (g *JacksonGenerator) SetupImport(jsonPackage modules.Module) string
func (*JacksonGenerator) SetupLibrary ¶ added in v2.1.1444
func (g *JacksonGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
func (*JacksonGenerator) VersionModels ¶ added in v2.1.1444
type MoshiGenerator ¶ added in v2.1.1519
func NewMoshiGenerator ¶ added in v2.1.1519
func NewMoshiGenerator(types *types.Types) *MoshiGenerator
func (*MoshiGenerator) CreateJsonMapperVar ¶ added in v2.1.1535
func (g *MoshiGenerator) CreateJsonMapperVar(w *sources.Writer)
func (*MoshiGenerator) InitJsonMapper ¶ added in v2.1.1519
func (g *MoshiGenerator) InitJsonMapper(w *sources.Writer)
func (*MoshiGenerator) JsonImports ¶ added in v2.1.1519
func (g *MoshiGenerator) JsonImports() []string
func (*MoshiGenerator) SetupImport ¶ added in v2.1.1535
func (g *MoshiGenerator) SetupImport(jsonPackage modules.Module) string
func (*MoshiGenerator) SetupLibrary ¶ added in v2.1.1519
func (g *MoshiGenerator) SetupLibrary(thePackage modules.Module) []sources.CodeFile
func (*MoshiGenerator) VersionModels ¶ added in v2.1.1519
Click to show internal directories.
Click to hide internal directories.