Documentation ¶
Index ¶
- Constants
- func FillHttpParam(param *Param) bool
- func FillHttpParams(params *[]Param)
- type DocHttpParams
- type DocInterface
- type OpenApi
- func (o *OpenApi) AssignParamsToSlices(params openapi3.Parameters, ...)
- func (o *OpenApi) FuzzDocHttpParams()
- func (o *OpenApi) GetBaseUrl() *string
- func (o *OpenApi) GetDocHttpParams() []*DocHttpParams
- func (o *OpenApi) HttpOperationToDocHttpParams(HttpMethod, path string, httpOperation *openapi3.Operation, pathParams []Param) []*DocHttpParams
- func (o *OpenApi) SetBaseUrl(baseUrl string) error
- func (o *OpenApi) SetDoc(doc interface{}) error
- func (o *OpenApi) SetDocHttpParams() error
- type Param
- type Parser
- type Swagger
Constants ¶
View Source
const ( ParameterInBody = "body" ParameterInCookie = openapi3.ParameterInCookie ParameterInPath = openapi3.ParameterInPath ParameterInHeader = openapi3.ParameterInHeader ParameterInQuery = openapi3.ParameterInQuery )
Variables ¶
This section is empty.
Functions ¶
func FillHttpParam ¶
Fill parser.Param.Value based on parser.Param.Type (type considers first value of the list)
Types ¶
type DocHttpParams ¶
type DocHttpParams struct { // Request Information HttpMethod string Url string Path string // Security Requirements Security []map[string][]string // Request Params BodyParams []Param CookieParams []Param HeaderParams []Param PathParams []Param QueryParams []Param // Response Params ResponseParams []Param }
DocHttpParams holds useful information about payloads and security requirements from the docs
func (*DocHttpParams) String ¶
func (d *DocHttpParams) String() string
type DocInterface ¶
type OpenApi ¶
type OpenApi struct { BaseUrl *string DocHttpParams []*DocHttpParams // contains filtered or unexported fields }
func (*OpenApi) AssignParamsToSlices ¶
func (o *OpenApi) AssignParamsToSlices(params openapi3.Parameters, httpPathParams, cookieParams, headerParams, queryParams, bodyParams *[]Param)
assigns openapi3 params to their respective params (path, cookie, header, query)
func (*OpenApi) FuzzDocHttpParams ¶
func (o *OpenApi) FuzzDocHttpParams()
Fuzz Doc Http Param Values based on type
func (*OpenApi) GetBaseUrl ¶
Get Base Url Warning: This method should be invoked only after SetBaseUrl method
func (*OpenApi) GetDocHttpParams ¶
func (o *OpenApi) GetDocHttpParams() []*DocHttpParams
For interface usage: to retrieve DocHttpParams value
func (*OpenApi) HttpOperationToDocHttpParams ¶
func (*OpenApi) SetBaseUrl ¶
Set BaseUrl for OpenApi struct
func (*OpenApi) SetDocHttpParams ¶
for interface usage: configure DocHttpParams value
type Param ¶
type Parser ¶
type Parser struct { Version string BaseUrl string IsOpenApi bool // else Swagger IsExternalRefsAllowed bool // OAS validation opts DisableExamplesValidation bool DisableSchemaDefaultsValidation bool DisableSchemaPatternValidation bool // Parsed Docs Doc DocInterface }
func (*Parser) FuzzDocHttpParams ¶
func (p *Parser) FuzzDocHttpParams()
type Swagger ¶
type Swagger struct {
// contains filtered or unexported fields
}
func (*Swagger) FuzzDocHttpParams ¶
func (s *Swagger) FuzzDocHttpParams()
func (*Swagger) GetBaseUrl ¶
func (*Swagger) GetDocHttpParams ¶
func (s *Swagger) GetDocHttpParams() []*DocHttpParams
func (*Swagger) SetBaseUrl ¶
func (*Swagger) SetDocHttpParams ¶
Click to show internal directories.
Click to hide internal directories.