Documentation ¶
Index ¶
- func IsOptional(t string) bool
- func Pattern2Method(pattern string) string
- func RestyMethod(method string) string
- type ClientOperationConverter
- type IOperationConverter
- type OpenAPICodeGenerator
- func (receiver OpenAPICodeGenerator) APIComments() []string
- func (receiver *OpenAPICodeGenerator) Api2Interface(paths map[string]v3.Path, svcName string, ...) astutils.InterfaceMeta
- func (receiver *OpenAPICodeGenerator) GenGoDto(schemas map[string]v3.Schema, output, pkg, tmpl string)
- func (receiver *OpenAPICodeGenerator) GenGoHTTP(paths map[string]v3.Path, svcName, dir, env, pkg string, ...)
- func (receiver *OpenAPICodeGenerator) GenGoInterface(output string, paths map[string]v3.Path, ...)
- type ServerOperationConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsOptional ¶
func Pattern2Method ¶
/shelves/{shelf}/books/{book} [shelves,{shelf},books,{book}] shelves_{shelf}_books_{book} Shelves_ShelfBooks_Book
func RestyMethod ¶
Types ¶
type ClientOperationConverter ¶
type ClientOperationConverter struct { Generator *OpenAPICodeGenerator // contains filtered or unexported fields }
func (*ClientOperationConverter) ConvertOperation ¶
func (receiver *ClientOperationConverter) ConvertOperation(endpoint, httpMethod string, operation *v3.Operation, gparams []v3.Parameter) (astutils.MethodMeta, error)
type IOperationConverter ¶
type OpenAPICodeGenerator ¶
type OpenAPICodeGenerator struct { Schemas map[string]v3.Schema RequestBodies map[string]v3.RequestBody Responses map[string]v3.Response Omitempty bool SvcName, ModName string Comments []string DtoPkg string ApiInfo *v3.Info }
func (OpenAPICodeGenerator) APIComments ¶
func (receiver OpenAPICodeGenerator) APIComments() []string
func (*OpenAPICodeGenerator) Api2Interface ¶
func (receiver *OpenAPICodeGenerator) Api2Interface(paths map[string]v3.Path, svcName string, operationConverter IOperationConverter) astutils.InterfaceMeta
func (*OpenAPICodeGenerator) GenGoDto ¶
func (receiver *OpenAPICodeGenerator) GenGoDto(schemas map[string]v3.Schema, output, pkg, tmpl string)
func (*OpenAPICodeGenerator) GenGoHTTP ¶
func (receiver *OpenAPICodeGenerator) GenGoHTTP(paths map[string]v3.Path, svcName, dir, env, pkg string, operationConverter IOperationConverter)
func (*OpenAPICodeGenerator) GenGoInterface ¶
func (receiver *OpenAPICodeGenerator) GenGoInterface(output string, paths map[string]v3.Path, operationConverter IOperationConverter)
type ServerOperationConverter ¶
type ServerOperationConverter struct { Generator *OpenAPICodeGenerator // contains filtered or unexported fields }
func (*ServerOperationConverter) ConvertOperation ¶
func (receiver *ServerOperationConverter) ConvertOperation(endpoint, httpMethod string, operation *v3.Operation, gparams []v3.Parameter) (astutils.MethodMeta, error)
Click to show internal directories.
Click to hide internal directories.