Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ErrNotFound = errors.New("operation for method/path not found")
ErrNotFound -
Functions ¶
This section is empty.
Types ¶
type HTTPResponse ¶ added in v1.6.9
type HTTPResponse struct { Method string Path string Header http.Header Body io.Reader StatusCode int }
HTTPResponse represents a response object from a HTTP Call
type Matcher ¶
Matcher exposes a path comparison interface Expected usage to compare a path that has placeholder and a real path. Ex: /accounts/{account_id} == /accounts/1234567890
type NullValidator ¶ added in v1.6.8
type NullValidator struct{}
NullValidator - type
func (NullValidator) IsRequestProperty ¶ added in v1.6.8
func (v NullValidator) IsRequestProperty(method, path, propertpath string) (bool, string, error)
IsRequestProperty - nop
func (NullValidator) Validate ¶ added in v1.6.8
func (v NullValidator) Validate(r HTTPResponse) ([]Failure, error)
Validate - nop
type OpenAPI3Validator ¶ added in v1.6.9
type OpenAPI3Validator struct {
// contains filtered or unexported fields
}
OpenAPI3Validator - type
func NewRawOpenAPI3Validator ¶ added in v1.6.9
func NewRawOpenAPI3Validator(specName, version string) (OpenAPI3Validator, error)
NewRawOpenAPI3Validator -
func (OpenAPI3Validator) IsRequestProperty ¶ added in v1.6.9
func (v OpenAPI3Validator) IsRequestProperty(method, path, propertpath string) (bool, string, error)
IsRequestProperty - not used so defaults to false
func (OpenAPI3Validator) Validate ¶ added in v1.6.9
func (v OpenAPI3Validator) Validate(r HTTPResponse) ([]Failure, error)
Validate - validates the response
type RequestWrapper ¶ added in v1.6.9
RequestWrapper -
type ResponseWrapper ¶ added in v1.6.9
ResponseWrapper -
type Validator ¶
type Validator interface { Validate(HTTPResponse) ([]Failure, error) IsRequestProperty(method, path, propertpath string) (bool, string, error) }
Validator validates a HTTP response object against a schema
func NewOpenAPI3Validator ¶ added in v1.6.9
NewOpenAPI3Validator - Create a router current just for v3.1.8 of the specifications prefering yaml for the spec file
func NewSwaggerOBSpecValidator ¶
NewSwaggerOBSpecValidator -
func NewSwaggerValidator ¶
NewSwaggerValidator returns a swagger validator implementation Takes a schema file path as source, can be remote http(s) or local