openapi

package
v0.0.0-...-9719495 Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtractOperationPathParamNames

func ExtractOperationPathParamNames(op Operation) []string

Types

type Operation

type Operation *openapi3.Operation

type Route

type Route struct {
	Path       string
	PathParams map[string]string
	Method     string
	Operation  Operation
}

type Schema

type Schema *openapi3.T

func LoadOpenApiSchemaFromFile

func LoadOpenApiSchemaFromFile(filePath string) (Schema, error)

func LoadOpenApiSchemaFromUrl

func LoadOpenApiSchemaFromUrl(url *url.URL) (Schema, error)

type Utils

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

func NewUtils

func NewUtils(schema Schema) *Utils

func (*Utils) GetOperation

func (u *Utils) GetOperation(id string) (method string, pattern string, operation Operation, err error)

func (*Utils) ValidateResponseAgainstRoute

func (u *Utils) ValidateResponseAgainstRoute(request *http.Request, response *http.Response, routeInfo Route) error

Jump to

Keyboard shortcuts

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