router

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2024 License: MPL-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CustomRoute added in v0.6.12

type CustomRoute struct {
	Route                  *routers.Route
	Path                   string
	Method                 string
	ParametersNumberInPath int
}

type Router

type Router struct {
	Routes        []CustomRoute
	SchemaVersion string
}

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.

func NewRouterDBLoader added in v0.6.12

func NewRouterDBLoader(schemaID int, openAPISpec database.DBOpenAPILoader) (*Router, error)

NewRouterDBLoader creates a new router based on DB OpenAPI loader.

Jump to

Keyboard shortcuts

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