helpers

package
v1.14.0 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: Apache-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 Schema

type Schema struct {
	// contains filtered or unexported fields
}

Schema abstracts schema access and validation.

func NewSchema

func NewSchema(get SchemaGetter) (*Schema, error)

NewOpenRpi extracts the swagger document. NOTE: this is surprisingly slow, make sure you cache it and reuse it.

func (*Schema) FindRoute

func (s *Schema) FindRoute(r *http.Request) (*routers.Route, map[string]string, error)

FindRoute looks up the route from the specification.

type SchemaGetter

type SchemaGetter func() (*openapi3.T, error)

SchemaGetter allows clients to get their schema from wherever.

Jump to

Keyboard shortcuts

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