router

package
v0.0.0-...-7627a42 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2023 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

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

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