Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CHValidator ¶
type CHValidator interface {
ValidateRequestAgainstOpenApiSpec(httpReq *http.Request, contextId string) ([]byte, error)
}
CHValidator provides an interface to interact with the CH Validator.
func NewCHValidator ¶
func NewCHValidator(openApiSpec string) (CHValidator, error)
NewCHValidator returns a new CHValidator implementation.
type CHValidatorImpl ¶
type CHValidatorImpl struct {
// contains filtered or unexported fields
}
CHValidatorImpl is a concrete implementation of the CHValidator interface.
func (CHValidatorImpl) ValidateRequestAgainstOpenApiSpec ¶
func (chv CHValidatorImpl) ValidateRequestAgainstOpenApiSpec(httpReq *http.Request, contextId string) ([]byte, error)
ValidateRequestAgainstOpenApiSpec takes a request and uses an openAPI3 spec to validate the request's body. If any validation errors are found, then they are formatted and returned to the caller. If any errors are encountered while attempting to validate, then they are handled and also returned to the caller.
Directories
¶
Path | Synopsis |
---|---|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
schema_testing
|
|
common
common contains common functions which can be used when unit testing schemas to make them more compact and easy to implement.
|
common contains common functions which can be used when unit testing schemas to make them more compact and easy to implement. |
Click to show internal directories.
Click to hide internal directories.