resolvers

package
v0.34.0 Latest Latest
Warning

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

Go to latest
Published: May 26, 2026 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

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 FindASTField

func FindASTField(file *ast.File, pos token.Pos) *ast.Field

func IsAny

func IsAny(o *types.TypeName) bool

func IsFieldStringable

func IsFieldStringable(tpe ast.Expr) bool

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 IsStdError(o *types.TypeName) bool

func IsStdJSONRawMessage

func IsStdJSONRawMessage(o *types.TypeName) bool

func IsStdTime

func IsStdTime(o *types.TypeName) bool

func IsTextMarshaler

func IsTextMarshaler(tpe types.Type) bool

func MustHaveRightHandSide

func MustHaveRightHandSide(a *types.Alias)

func MustNotBeABuiltinType

func MustNotBeABuiltinType(o *types.TypeName)

func ParseJSONTag

func ParseJSONTag(field *ast.Field) (name string, ignore, isString, omitEmpty bool, err error)

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 UnsupportedBasic(tpe *types.Basic) bool

func UnsupportedBuiltin

func UnsupportedBuiltin(tpe ifaces.Objecter) bool

func UnsupportedBuiltinType

func UnsupportedBuiltinType(tpe types.Type) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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