Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TestCaseValidator ¶ added in v0.3.0
type TestCaseValidator struct { Validator // contains filtered or unexported fields }
TestCaseValidator is the test-specific validation, which includes a reference to the current testing.T
func (TestCaseValidator) Validate ¶ added in v0.3.0
func (v TestCaseValidator) Validate(rr *httptest.ResponseRecorder, req *http.Request)
Validate validates that the given request and recorded response match the configured OpenAPI specification. If any validation errors are found, the test will be failed
type Validator ¶
type Validator struct {
// contains filtered or unexported fields
}
Validator Validator is a container struct for the configuration for a given OpenAPI specification
func NewValidator ¶
NewValidator Construct a new Validator
func NewValidatorWithAuthenticator ¶ added in v0.2.0
func NewValidatorWithAuthenticator(openapi *openapi3.T, authenticationFunc openapi3filter.AuthenticationFunc) Validator
NewValidatorWithAuthenticator Construct a new Validator, with custom AuthenticatorFunc for the `openapi3filter`
func (Validator) ForTest ¶ added in v0.3.0
func (v Validator) ForTest(t testingT, rr *httptest.ResponseRecorder, req *http.Request) TestCaseValidator
ForTest Construct a new TestCaseValidator for the specific test. Automagically performs Validate call.
Click to show internal directories.
Click to hide internal directories.