Versions in this module Expand all Collapse all v1 v1.20.2 Jan 28, 2022 Changes in this version + const XEnumLabels + const XEnumOptions + const XGoFieldName + const XGoStarLevel + const XGoVendorType + const XID + const XStatusErrs + const XTagJSON + const XTagMime + const XTagName + const XTagValidate + const XTagXML + func BindSchemaValidationByValidateBytes(s *oas.Schema, typ types.Type, validateBytes []byte) error + func BindSchemaValidationByValidator(s *oas.Schema, v validator.Validator) + type DefinitionScanner struct + func NewDefinitionScanner(pkg *packagesx.Package) *DefinitionScanner + func (scanner *DefinitionScanner) BindSchemas(openapi *oas.OpenAPI) + func (scanner *DefinitionScanner) Def(ctx context.Context, typeName *types.TypeName) *oas.Schema + func (scanner *DefinitionScanner) GetSchemaByType(ctx context.Context, typ types.Type) *oas.Schema + type OpenAPIGenerator struct + func NewOpenAPIGenerator(pkg *packagesx.Package) *OpenAPIGenerator + func (g *OpenAPIGenerator) OperationByOperatorTypes(method string, operatorTypes ...*OperatorWithTypeName) *oas.Operation + func (g *OpenAPIGenerator) Output(cwd string) + func (g *OpenAPIGenerator) Scan(ctx context.Context) + type Operator struct + Description string + NonBodyParameters map[string]*oas.Parameter + RequestBody *oas.RequestBody + StatusErrorSchema *oas.Schema + StatusErrors []*statuserror.StatusErr + SuccessResponse *oas.Response + SuccessStatus int + SuccessType types.Type + Tag string + func (operator *Operator) AddNonBodyParameter(parameter *oas.Parameter) + func (operator *Operator) BindOperation(method string, operation *oas.Operation, last bool) + func (operator *Operator) SetRequestBody(requestBody *oas.RequestBody) + type OperatorScanner struct + func NewOperatorScanner(pkg *packagesx.Package) *OperatorScanner + func (scanner *OperatorScanner) Operator(ctx context.Context, typeName *types.TypeName) *Operator + type OperatorWithTypeName struct + TypeName *types.TypeName + func (operator *OperatorWithTypeName) String() string + type Route struct + Operators []*OperatorWithTypeName + func (route *Route) Method() string + func (route *Route) Path() string + func (route *Route) String() string + type Router struct + func NewRouter(typeVar *types.Var, operators ...*OperatorWithTypeName) *Router + func (r *Router) Name() string + func (r *Router) String() string + func (router *Router) AppendOperators(operators ...*OperatorWithTypeName) + func (router *Router) Register(r *Router) + func (router *Router) Route() *Route + func (router *Router) Routes() (routes []*Route) + func (router *Router) With(operators ...*OperatorWithTypeName) + type RouterScanner struct + func NewRouterScanner(pkg *packagesx.Package) *RouterScanner + func (scanner *RouterScanner) OperatorTypeNameFromType(typ types.Type) *OperatorWithTypeName + func (scanner *RouterScanner) OperatorTypeNamesFromArgs(pkg *packagesx.Package, args ...ast.Expr) []*OperatorWithTypeName + func (scanner *RouterScanner) Router(typeName *types.Var) *Router + type SchemaRefer struct + func NewSchemaRefer(s *oas.Schema) *SchemaRefer + func (r SchemaRefer) RefString() string + type StatusErrScanner struct + StatusErrType *types.Named + func NewStatusErrScanner(pkg *packagesx.Package) *StatusErrScanner + func (scanner *StatusErrScanner) StatusErrorsInFunc(typeFunc *types.Func) []*statuserror.StatusErr + type VendorExtensible interface + AddExtension func(key string, value interface{})