go-swagger: github.com/go-swagger/go-swagger/codescan Index | Files

package codescan

import "github.com/go-swagger/go-swagger/codescan"

Index

Package Files

application.go meta.go operations.go parameters.go parser.go regexprs.go responses.go route_params.go routes.go schema.go spec.go

Constants

const (
    // ParamDescriptionKey indicates the tag used to define a parameter description in swagger:route
    ParamDescriptionKey = "description"
    // ParamNameKey indicates the tag used to define a parameter name in swagger:route
    ParamNameKey = "name"
    // ParamInKey indicates the tag used to define a parameter location in swagger:route
    ParamInKey = "in"
    // ParamRequiredKey indicates the tag used to declare whether a parameter is required in swagger:route
    ParamRequiredKey = "required"
    // ParamTypeKey indicates the tag used to define the parameter type in swagger:route
    ParamTypeKey = "type"
    // ParamAllowEmptyKey indicates the tag used to indicate whether a parameter allows empty values in swagger:route
    ParamAllowEmptyKey = "allowempty"

    // SchemaMinKey indicates the tag used to indicate the minimum value allowed for this type in swagger:route
    SchemaMinKey = "min"
    // SchemaMaxKey indicates the tag used to indicate the maximum value allowed for this type in swagger:route
    SchemaMaxKey = "max"
    // SchemaEnumKey indicates the tag used to specify the allowed values for this type in swagger:route
    SchemaEnumKey = "enum"
    // SchemaFormatKey indicates the expected format for this field in swagger:route
    SchemaFormatKey = "format"
    // SchemaDefaultKey indicates the default value for this field in swagger:route
    SchemaDefaultKey = "default"
    // SchemaMinLenKey indicates the minimum length this field in swagger:route
    SchemaMinLenKey = "minlength"
    // SchemaMaxLenKey indicates the minimum length this field in swagger:route
    SchemaMaxLenKey = "maxlength"

    // TypeArray is the identifier for an array type in swagger:route
    TypeArray = "array"
    // TypeNumber is the identifier for a number type in swagger:route
    TypeNumber = "number"
    // TypeInteger is the identifier for an integer type in swagger:route
    TypeInteger = "integer"
    // TypeBoolean is the identifier for a boolean type in swagger:route
    TypeBoolean = "boolean"
    // TypeBool is the identifier for a boolean type in swagger:route
    TypeBool = "bool"
    // TypeObject is the identifier for an object type in swagger:route
    TypeObject = "object"
    // TypeString is the identifier for a string type in swagger:route
    TypeString = "string"
)
const BodyTag = "body"

BodyTag used when specifying a response to point to a model/schema

const DescriptionTag = "description"

DescriptionTag used when specifying a response that gives a description of the response

const ResponseTag = "response"

ResponseTag used when specifying a response to point to a defined swagger:response

Variables

var Debug = safeConvert(os.Getenv("DEBUG"))

Debug is true when process is run with DEBUG=1 env var

func Run Uses

func Run(opts *Options) (*spec.Swagger, error)

Run the scanner to produce a spec with the options provided

type Options Uses

type Options struct {
    Packages    []string
    InputSpec   *spec.Swagger
    ScanModels  bool
    WorkDir     string
    BuildTags   string
    ExcludeDeps bool
    Include     []string
    Exclude     []string
    IncludeTags []string
    ExcludeTags []string
}

Options for the scanner

Package codescan imports 19 packages (graph) and is imported by 1 packages. Updated 2019-08-18. Refresh now. Tools for package owners.