router

package
v0.6.11 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2023 License: MPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Route

type Route struct {
	Route  *routers.Route
	Path   string
	Method string
}

type Router

type Router struct {
	Routes []Route
}

Router helps link http.Request.s and an OpenAPIv3 spec

func NewRouter

func NewRouter(doc *openapi3.T) (*Router, error)

NewRouter creates a new router.

If the given Swagger has servers, router will use them. All operations of the Swagger will be added to the router.

Jump to

Keyboard shortcuts

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