Versions in this module Expand all Collapse all v0 v0.66.1 Jul 22, 2021 Changes in this version + var DefaultOptions = &Options + var ErrAuthenticationServiceMissing = errors.New("missing AuthenticationFunc") + var ErrInvalidRequired = errors.New("value is required but missing") + var JSONPrefixes = []string + func DefaultErrorEncoder(_ context.Context, err error, w http.ResponseWriter) + func FileBodyDecoder(body io.Reader, header http.Header, schema *openapi3.SchemaRef, ...) (interface{}, error) + func NoopAuthenticationFunc(context.Context, *AuthenticationInput) error + func RegisterBodyDecoder(contentType string, decoder BodyDecoder) + func TrimJSONPrefix(data []byte) []byte + func UnregisterBodyDecoder(contentType string) + func ValidateParameter(ctx context.Context, input *RequestValidationInput, ...) error + func ValidateRequest(ctx context.Context, input *RequestValidationInput) error + func ValidateRequestBody(ctx context.Context, input *RequestValidationInput, ...) error + func ValidateResponse(ctx context.Context, input *ResponseValidationInput) error + func ValidateSecurityRequirements(ctx context.Context, input *RequestValidationInput, ...) error + type AuthenticationFunc func(context.Context, *AuthenticationInput) error + type AuthenticationInput struct + RequestValidationInput *RequestValidationInput + Scopes []string + SecurityScheme *openapi3.SecurityScheme + SecuritySchemeName string + func (input *AuthenticationInput) NewError(err error) error + type BodyDecoder func(io.Reader, http.Header, *openapi3.SchemaRef, EncodingFn) (interface{}, error) + func RegisteredBodyDecoder(contentType string) BodyDecoder + type ContentParameterDecoder func(param *openapi3.Parameter, values []string) (interface{}, *openapi3.Schema, error) + type EncodingFn func(partName string) *openapi3.Encoding + type ErrorEncoder func(ctx context.Context, err error, w http.ResponseWriter) + type Headerer interface + Headers func() http.Header + type Options struct + AuthenticationFunc AuthenticationFunc + ExcludeRequestBody bool + ExcludeResponseBody bool + IncludeResponseStatus bool + MultiError bool + type ParseError struct + Cause error + Kind ParseErrorKind + Reason string + Value interface{} + func (e *ParseError) Error() string + func (e *ParseError) Path() []interface{} + func (e *ParseError) RootCause() error + type ParseErrorKind int + const KindInvalidFormat + const KindOther + const KindUnsupportedFormat + type RequestError struct + Err error + Input *RequestValidationInput + Parameter *openapi3.Parameter + Reason string + RequestBody *openapi3.RequestBody + func (err *RequestError) Error() string + type RequestValidationInput struct + Options *Options + ParamDecoder ContentParameterDecoder + PathParams map[string]string + QueryParams url.Values + Request *http.Request + Route *routers.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 SecurityRequirementsError struct + Errors []error + SecurityRequirements openapi3.SecurityRequirements + func (err *SecurityRequirementsError) Error() string + type StatusCoder interface + StatusCode func() int + type ValidationError struct + Code string + Detail string + Id string + Source *ValidationErrorSource + Status int + Title string + func (e *ValidationError) Error() string + func (e *ValidationError) StatusCode() int + type ValidationErrorEncoder struct + Encoder ErrorEncoder + func (enc *ValidationErrorEncoder) Encode(ctx context.Context, err error, w http.ResponseWriter) + type ValidationErrorSource struct + Parameter string + Pointer string + type ValidationHandler struct + AuthenticationFunc AuthenticationFunc + ErrorEncoder ErrorEncoder + File string + Handler http.Handler + func (h *ValidationHandler) Load() error + func (h *ValidationHandler) Middleware(next http.Handler) http.Handler + func (h *ValidationHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) v0.1.0 Sep 29, 2018