v2

package
v0.0.0-...-61829c1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 26, 2019 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ToClient

func ToClient(baseClient string, serviceName string, swagger *spec.Swagger) string

func ToTypes

func ToTypes(serviceName string, pkgName string, swagger *spec.Swagger) string

Types

type SwaggerOperation

type SwaggerOperation struct {
	*spec.Operation
	// contains filtered or unexported fields
}

func SwaggerOperationFrom

func SwaggerOperationFrom(serviceName string, method string, path string, operation *spec.Operation, responses map[string]spec.Response) *SwaggerOperation

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

type TypeGenerator struct {
	ServiceName string
	Importer    *codegen.Importer
}

func NewTypeGenerator

func NewTypeGenerator(serviceName string, importer *codegen.Importer) *TypeGenerator

func (*TypeGenerator) FieldFrom

func (g *TypeGenerator) FieldFrom(name string, propSchema *spec.Schema, requiredFields ...string) *common.Field

func (*TypeGenerator) PrefixType

func (g *TypeGenerator) PrefixType(tpe string) string

func (*TypeGenerator) Type

func (g *TypeGenerator) Type(schema *spec.Schema) 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL