middleware

package
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2019 License: Apache-2.0 Imports: 7 Imported by: 106 modules, 106 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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