ginopenapivalidator

package
v0.0.0-...-1722742 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 12 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, options ...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 {
	TestT *testing.T
}

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