Documentation ¶
Index ¶
- Variables
- func FilterGoImport(str string) string
- func FilterGoType(str string) string
- func Generate(spec *openapi3.T, opts codegen.Configuration) (string, error)
- func GenerateModels(specFile string, destDir string, opts codegen.Configuration) error
- func GenerateTests(srcFile string, destDir string, opts Config) error
- func LoadSwagger(filePath string) (swagger *openapi3.T, err error)
- func LoadTemplates(src embed.FS, t *template.Template) error
- func MakeJsonSchemaFromYaml(filePath string) ([]byte, error)
- func PascalFrom_snake_case(snake_case string) string
- func PubCapitalize(str string) string
- func SanitizeCode(goCode string) string
- type Config
- type Payload
Constants ¶
This section is empty.
Variables ¶
View Source
var TemplatesFS embed.FS
Embed the templates directory
Functions ¶
func FilterGoImport ¶
func FilterGoType ¶
func GenerateModels ¶
func GenerateModels(specFile string, destDir string, opts codegen.Configuration) error
func MakeJsonSchemaFromYaml ¶
func PascalFrom_snake_case ¶
func PubCapitalize ¶
func SanitizeCode ¶
Types ¶
type Payload ¶
type Payload struct { SchemaName string ModuleName string Package string GenVersion string SpecVersion string SpecFile string GoSchema codegen.Schema Imports []string PubFieldLookup map[string]string PubFieldName func(string) string FilterGoType func(string) string FilterGoImport func(string) string }
Click to show internal directories.
Click to hide internal directories.