Documentation ¶
Overview ¶
Package middleware implements middleware function for go-chi or net/http, which validates incoming HTTP requests to make sure that they conform to the given OAPI 3.0 specification. When OAPI validation failes on the request, we return an HTTP/400.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func OapiRequestValidator ¶
OapiRequestValidator Creates middleware to validate request by swagger spec. This middleware is good for net/http either since go-chi is 100% compatible with net/http.
func OapiRequestValidatorWithOptions ¶
func OapiRequestValidatorWithOptions(swagger *openapi3.T, options *Options) func(next http.Handler) http.Handler
OapiRequestValidatorWithOptions Creates middleware to validate request by swagger spec. This middleware is good for net/http either since go-chi is 100% compatible with net/http.
Types ¶
type Options ¶
type Options struct {
Options openapi3filter.Options
}
Options to customize request validation, openapi3filter specified options will be passed through.