openapitest

package
v0.2.50 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const CanonicalDocumentPath = "docs/openapi.yaml"

Variables

This section is empty.

Functions

This section is empty.

Types

type Contract

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

func Load

func Load(path string) (*Contract, error)

func (*Contract) Operations

func (contract *Contract) Operations() ([]OperationKey, error)

func (*Contract) ProtocolMethods

func (contract *Contract) ProtocolMethods() (map[string]struct{}, error)

func (*Contract) RequestPropertyNames

func (contract *Contract) RequestPropertyNames(path string, method string) ([]string, error)

func (*Contract) SecurityRequirements

func (contract *Contract) SecurityRequirements(path string, method string) ([][]string, error)

func (*Contract) SecurityScheme

func (contract *Contract) SecurityScheme(name string) (SecurityScheme, error)

func (*Contract) ServerURLs

func (contract *Contract) ServerURLs() ([]string, error)

func (*Contract) ValidateRequest

func (contract *Contract) ValidateRequest(path string, method string, request *http.Request, body []byte) error

func (*Contract) ValidateResponse

func (contract *Contract) ValidateResponse(path string, method string, statusCode int, headers http.Header, body []byte) error

type OperationKey

type OperationKey struct {
	Method string
	Path   string
}

type SecurityScheme

type SecurityScheme struct {
	Type string
	In   string
	Name string
}

Jump to

Keyboard shortcuts

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