Documentation
¶
Index ¶
- Variables
- func KeywordMappingFunc(name string) string
- func LoadExtraConfig(configFile string) error
- type APIDefinition
- type EnumValue
- type ExtraConfig
- type FieldDefinition
- type Generator
- type MethodConfig
- type MethodDefinition
- type ModelConfig
- type ModelDefinition
- type ModelPkgDefinition
- type ParamDefinition
- type Response
- type ServiceDefinition
Constants ¶
This section is empty.
Variables ¶
Functions ¶
Types ¶
type APIDefinition ¶
type ExtraConfig ¶
type ExtraConfig struct { Paths map[string]map[string]MethodConfig `yaml:"paths"` Models map[string]ModelConfig `yaml:"models"` }
type FieldDefinition ¶
type Generator ¶
type Generator struct { Config *config.Config Services map[string]ServiceDefinition ModelPkgs map[string]ModelPkgDefinition }
type MethodConfig ¶
type MethodDefinition ¶
type MethodDefinition struct { Name string Summary string Endpoint string FormatEndpoint string HTTPMethod string Parameters []*ParamDefinition ReturnType string PathParams []*ParamDefinition QueryParams []*ParamDefinition BodyParams []*ParamDefinition ResponseType string // 新增响应类型字段 IsArrayResponse bool // 是否是数组响应 }
type ModelDefinition ¶
type ModelPkgDefinition ¶
type ModelPkgDefinition struct {
Models []*ModelDefinition
}
type ParamDefinition ¶
type ServiceDefinition ¶
type ServiceDefinition struct { ServiceName string StructName string Methods []*MethodDefinition Models []*ModelDefinition Imports map[string]struct{} ImportList []string }
Click to show internal directories.
Click to hide internal directories.