Documentation ¶
Index ¶
- func ToClient(baseClient string, serviceName string, swagger *spec.Swagger) string
- func ToTypes(serviceName string, pkgName string, swagger *spec.Swagger) string
- type SwaggerOperation
- func (op *SwaggerOperation) HasRequest() bool
- func (op *SwaggerOperation) ID() string
- func (op *SwaggerOperation) Method() string
- func (op *SwaggerOperation) Path() string
- func (op *SwaggerOperation) WriteReqType(w io.Writer, importer *codegen.Importer)
- func (op *SwaggerOperation) WriteRespBodyType(w io.Writer, importer *codegen.Importer)
- type TypeGenerator
- func (g *TypeGenerator) FieldFrom(name string, propSchema *spec.Schema, requiredFields ...string) *common.Field
- func (g *TypeGenerator) PrefixType(tpe string) string
- func (g *TypeGenerator) Type(schema *spec.Schema) string
- func (g *TypeGenerator) TypeIndirect(schema *spec.Schema) string
- func (g *TypeGenerator) WriteFields(w io.Writer, schema *spec.Schema)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type SwaggerOperation ¶
func SwaggerOperationFrom ¶
func (*SwaggerOperation) HasRequest ¶
func (op *SwaggerOperation) HasRequest() bool
func (*SwaggerOperation) ID ¶
func (op *SwaggerOperation) ID() string
func (*SwaggerOperation) Method ¶
func (op *SwaggerOperation) Method() string
func (*SwaggerOperation) Path ¶
func (op *SwaggerOperation) Path() string
func (*SwaggerOperation) WriteReqType ¶
func (op *SwaggerOperation) WriteReqType(w io.Writer, importer *codegen.Importer)
func (*SwaggerOperation) WriteRespBodyType ¶
func (op *SwaggerOperation) WriteRespBodyType(w io.Writer, importer *codegen.Importer)
type TypeGenerator ¶
func NewTypeGenerator ¶
func NewTypeGenerator(serviceName string, importer *codegen.Importer) *TypeGenerator
func (*TypeGenerator) PrefixType ¶
func (g *TypeGenerator) PrefixType(tpe string) string
func (*TypeGenerator) TypeIndirect ¶
func (g *TypeGenerator) TypeIndirect(schema *spec.Schema) string
func (*TypeGenerator) WriteFields ¶
func (g *TypeGenerator) WriteFields(w io.Writer, schema *spec.Schema)
Click to show internal directories.
Click to hide internal directories.