Versions in this module Expand all Collapse all v1 v1.22.0 Apr 25, 2024 Changes in this version + func VendorImportsFromContext(ctx context.Context) map[string]bool + func WithVendorImports(ctx context.Context, vendorImports map[string]bool) context.Context + type ClientGenerator struct + ServiceName string + URL *url.URL + func NewClientGenerator(serviceName string, u *url.URL, opts ...GenOptionFn) *ClientGenerator + func (g *ClientGenerator) Load() + func (g *ClientGenerator) Output(cwd string) + type GenOption struct + VendorImportByGoMod bool + type GenOptionFn = func(o *GenOption) + func OptionVendorImportByGoMod() GenOptionFn + type OperationGenerator struct + File *codegen.File + ServiceName string + func NewOperationGenerator(serviceName string, file *codegen.File) *OperationGenerator + func (g *OperationGenerator) ID(id string) string + func (g *OperationGenerator) ParamField(ctx context.Context, parameter *oas.Parameter) *codegen.SnippetField + func (g *OperationGenerator) RequestBodyField(ctx context.Context, requestBody *oas.RequestBody) *codegen.SnippetField + func (g *OperationGenerator) ResponseType(ctx context.Context, responses *oas.Responses) (codegen.SnippetType, []string) + func (g *OperationGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *OperationGenerator) WriteOperation(ctx context.Context, method string, path string, operation *oas.Operation) + type ServiceClientGenerator struct + File *codegen.File + ServiceName string + func NewServiceClientGenerator(serviceName string, file *codegen.File) *ServiceClientGenerator + func (g *ServiceClientGenerator) ClientInstanceName() string + func (g *ServiceClientGenerator) ClientInterfaceName() string + func (g *ServiceClientGenerator) OperationMethod(ctx context.Context, operation *oas.Operation, asInterface bool) codegen.Snippet + func (g *ServiceClientGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *ServiceClientGenerator) WriteClient() + func (g *ServiceClientGenerator) WriteClientInterface(ctx context.Context, openapi *oas.OpenAPI) + type TypeGenerator struct + Enums map[string]scanner.Options + File *codegen.File + ServiceName string + func NewTypeGenerator(serviceName string, file *codegen.File) *TypeGenerator + func (g *TypeGenerator) BasicType(schemaType string, format string) codegen.SnippetType + func (g *TypeGenerator) FieldOf(ctx context.Context, name string, propSchema *oas.Schema, ...) *codegen.SnippetField + func (g *TypeGenerator) FieldsFrom(ctx context.Context, schema *oas.Schema) (fields []*codegen.SnippetField) + func (g *TypeGenerator) Scan(ctx context.Context, openapi *oas.OpenAPI) + func (g *TypeGenerator) Type(ctx context.Context, schema *oas.Schema) (codegen.SnippetType, bool) + func (g *TypeGenerator) TypeIndirect(ctx context.Context, schema *oas.Schema) (codegen.SnippetType, bool)