Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( DefaultVarDumpFileName = "required_openapi_params.yaml" ErrNoVarsDumpFile = errors.New("no required params file found") )
Functions ¶
func WriteOpenAPIVarDumpFile ¶
func WriteOpenAPIVarDumpFile(vars *OpenAPIParamsCfgFile) error
WriteOpenAPIVarDumpFile writes the required vars dump file
Types ¶
type Format ¶
type Format interface {
// Name returns the name of the format
Name() string
// Parse parses the input and calls the provided callback
// function for each RawRequest it discovers.
Parse(input string, resultsCb ParseReqRespCallback) error
// SetOptions sets the options for the input format
SetOptions(options InputFormatOptions)
}
Format is an interface implemented by all input formats
type InputFormatOptions ¶
type InputFormatOptions struct {
// Variables is list of variables that can be used
// while generating requests in given format
Variables map[string]interface{}
// SkipFormatValidation is used to skip format validation
// while debugging or testing if format is invalid then
// requests are skipped instead of creating invalid requests
SkipFormatValidation bool
// RequiredOnly only uses required fields when generating requests
// instead of all fields
RequiredOnly bool
}
InputFormatOptions contains options for the input this can be variables that can be passed or overrides or some other options
type OpenAPIParamsCfgFile ¶
type OpenAPIParamsCfgFile struct {
Var []string `yaml:"var"`
OptionalVars []string `yaml:"-"` // this will be written to the file as comments
}
OpenAPIParamsCfgFile is the structure of the required vars dump file
func ReadOpenAPIVarDumpFile ¶
func ReadOpenAPIVarDumpFile() (*OpenAPIParamsCfgFile, error)
ReadOpenAPIVarDumpFile reads the required vars dump file
type ParseReqRespCallback ¶
type ParseReqRespCallback func(rr *types.RequestResponse) bool
ParseReqRespCallback is a callback function for discovered raw requests
Click to show internal directories.
Click to hide internal directories.