Versions in this module Expand all Collapse all v0 v0.1.0 Sep 29, 2018 Changes in this version + var DefaultJSONMediaTypes = []string + var DefaultOptions = &Options + var ErrAuthenticationServiceMissing = errors.New("Request validator doesn't have an authentication service defined") + var JSONPrefixes = []string + func TrimJSONPrefix(data []byte) []byte + func ValidateParameter(c context.Context, input *RequestValidationInput, ...) error + func ValidateRequest(c context.Context, input *RequestValidationInput) error + func ValidateRequestBody(c context.Context, input *RequestValidationInput, ...) error + func ValidateResponse(c context.Context, input *ResponseValidationInput) error + func ValidateSecurityRequirements(c context.Context, input *RequestValidationInput, ...) error + type AuthenticationInput struct + RequestValidationInput *RequestValidationInput + Scopes []string + SecurityScheme *openapi3.SecurityScheme + SecuritySchemeName string + func (input *AuthenticationInput) NewError(err error) error + type Options struct + AuthenticationFunc func(c context.Context, input *AuthenticationInput) error + ExcludeRequestBody bool + ExcludeResponseBody bool + IncludeResponseStatus bool + type RequestError struct + Err error + Input *RequestValidationInput + Parameter *openapi3.Parameter + Reason string + RequestBody *openapi3.RequestBody + Status int + func (err *RequestError) Error() string + func (err *RequestError) HTTPStatus() int + type RequestValidationInput struct + Options *Options + PathParams map[string]string + QueryParams url.Values + Request *http.Request + Route *Route + func (input *RequestValidationInput) GetQueryParams() url.Values + type ResponseError struct + Err error + Input *ResponseValidationInput + Reason string + func (err *ResponseError) Error() string + type ResponseValidationInput struct + Body io.ReadCloser + Header http.Header + Options *Options + RequestValidationInput *RequestValidationInput + Status int + func (input *ResponseValidationInput) SetBodyBytes(value []byte) *ResponseValidationInput + type Route struct + Handler http.Handler + Method string + Operation *openapi3.Operation + Path string + PathItem *openapi3.PathItem + Server *openapi3.Server + Swagger *openapi3.Swagger + type RouteError struct + Reason string + Route Route + func (err *RouteError) Error() string + type Router struct + func NewRouter() *Router + func (router *Router) AddRoute(route *Route) error + func (router *Router) AddSwagger(swagger *openapi3.Swagger) error + func (router *Router) AddSwaggerFromFile(path string) error + func (router *Router) FindRoute(method string, url *url.URL) (*Route, map[string]string, error) + func (router *Router) WithSwagger(swagger *openapi3.Swagger) *Router + func (router *Router) WithSwaggerFromFile(path string) *Router + type Routers []*Router + func (routers Routers) FindRoute(method string, url *url.URL) (*Router, *Route, map[string]string, error) + type SecurityRequirementsError struct + Errors []error + SecurityRequirements openapi3.SecurityRequirements + func (err *SecurityRequirementsError) Error() string