middleware

package
v1.0.6 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 19, 2019 License: Apache-2.0 Imports: 7 Imported by: 89

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func OapiRequestValidator

func OapiRequestValidator(swagger *openapi3.Swagger) echo.MiddlewareFunc

Create a validator from a swagger object.

func OapiValidatorFromYamlFile

func OapiValidatorFromYamlFile(path string) (echo.MiddlewareFunc, error)

Create validator middleware from a YAML file path

func ValidateRequestFromContext

func ValidateRequestFromContext(ctx echo.Context, router *openapi3filter.Router) error

This function is called from the middleware above and actually does the work of validating a request. TODO(marcin): kin-openapi, which we use for swagger validation, currently only

validates string parameters, and assumes that the rest are valid. I need to
handle param validation myself, or fix their code.

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL