chai

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2022 License: MIT Imports: 8 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

View Source
var RegexPatternSchemas = map[string]spec.SimpleSchema{
	"/^(0|-*[1-9]+[0-9]*)$/":  integerSchema,
	"^[0-9]+$":                integerSchema,
	"[+-]?([0-9]*[.])?[0-9]+": numberSchema,
}

Functions

func Connect

func Connect[Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ResHandlerFunc[Res, Err])

func Delete

func Delete[Req any, Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ReqResHandlerFunc[Req, Res, Err])

func Get

func Get[Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ResHandlerFunc[Res, Err])

func OpenAPI2

func OpenAPI2(r chi.Routes) (*spec.Swagger, error)

func OpenAPI3

func OpenAPI3(r chi.Routes) (*kinopenapi3.T, error)

func Options

func Options[Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ResHandlerFunc[Res, Err])

func ParsePathParams

func ParsePathParams(path string) ([]spec.Parameter, string)

func Patch

func Patch[Req any, Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ReqResHandlerFunc[Req, Res, Err])

func Post

func Post[Req any, Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ReqResHandlerFunc[Req, Res, Err])

func Put

func Put[Req any, Res any, Err chai.ErrType](r chai.Methoder, path string, fn chai.ReqResHandlerFunc[Req, Res, Err])

Types

This section is empty.

Jump to

Keyboard shortcuts

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