Documentation
¶
Index ¶
- Constants
- Variables
- func AddExtension(ve *oaispec.VendorExtensible, key string, value any, skip bool)
- func FindASTField(file *ast.File, pos token.Pos) *ast.Field
- func IsAny(o *types.TypeName) bool
- func IsFieldStringable(tpe ast.Expr) bool
- func IsStdError(o *types.TypeName) bool
- func IsStdJSONRawMessage(o *types.TypeName) bool
- func IsStdTime(o *types.TypeName) bool
- func IsTextMarshaler(tpe types.Type) bool
- func MustHaveRightHandSide(a *types.Alias)
- func MustNotBeABuiltinType(o *types.TypeName)
- func ParseJSONTag(field *ast.Field) (name string, ignore, isString, omitEmpty bool, err error)
- func SwaggerSchemaForType(typeName string, prop ifaces.SwaggerTypable) error
- func UnsupportedBasic(tpe *types.Basic) bool
- func UnsupportedBuiltin(tpe ifaces.Objecter) bool
- func UnsupportedBuiltinType(tpe types.Type) bool
Constants ¶
View Source
const (
ErrInternal internalError = "internal error due to a bug or a mishandling of go types AST. This usually indicates a bug in the scanner"
)
Variables ¶
View Source
var ErrResolver = errors.New("codescan:resolver")
ErrResolver is the sentinel error for all errors originating from the resolver package.
Functions ¶
func AddExtension ¶
func AddExtension(ve *oaispec.VendorExtensible, key string, value any, skip bool)
func IsFieldStringable ¶
IsFieldStringable check if the field type is a scalar. If the field type is *ast.StarExpr and is pointer type, check if it refers to a scalar. Otherwise, the ",string" directive doesn't apply.
func IsStdError ¶
func IsStdJSONRawMessage ¶
func IsTextMarshaler ¶
func MustHaveRightHandSide ¶
func MustNotBeABuiltinType ¶
func ParseJSONTag ¶
func SwaggerSchemaForType ¶
func SwaggerSchemaForType(typeName string, prop ifaces.SwaggerTypable) error
SwaggerSchemaForType maps all Go builtin types that have Json representation to Swagger/Json types.
See https://golang.org/pkg/builtin/ and http://swagger.io/specification/
func UnsupportedBasic ¶
func UnsupportedBuiltin ¶
func UnsupportedBuiltinType ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.