ginopenapivalidator

package
v0.0.0-...-b2a73ad Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2021 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

package ginopenapivalidator is a middleware for gin that allows you validate request and responses

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode

func Decode(err error) (*openapi3filter.ValidationError, error)

Decode takes a Validation error and decodes back to a *openapi3filter.ValidationError

func Validator

func Validator(doc []byte, _ ...ValidatorOptions) gin.HandlerFunc

Validator returns a OpenAPI Validator middleware. It takes as argument doc where this is meant to be yaml byte array

Types

type ValidatorOptions

type ValidatorOptions struct {
}

ValidatorOptions currently not used but we may use it in the future to add options.

Jump to

Keyboard shortcuts

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