Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IgnoreBasePath ¶ added in v0.0.4
func IgnoreBasePath(a *apiVerifier)
IgnoreBasePath disables check if request path is contains base path configured in API document. By default, base path is always checked.
func NewRequestVerifier ¶
func NewRequestVerifier(definitionPath string, options ...option) (func(*http.Request) error, error)
NewRequestVerifier returns a function that can be used to verify if request satisfies OpenAPI definition constraints
func NewVerifier ¶
func NewVerifier(definitionPath string, options ...option) (func(*http.Response, *http.Request) error, error)
NewVerifier returns a function that can be used to verify both - a request and the response made in the context of the request
func NoStrictContentType ¶ added in v0.0.3
func NoStrictContentType(a *apiVerifier)
NoStrictContentType disables strict content-type validation which is enabled by default. StrictContentType validation will raise errors in the following cases:
- content-type header doesn't fully match content-types listed in consumes or produces section for request and response correspondingly
- consumes or produces section are not configured for current request request and response correspondingly
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.