openapi

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMaxBytes = 10 * 1024 * 1024
	DefaultTimeout  = 30 * time.Second
)

Variables

This section is empty.

Functions

func DescribeOp

func DescribeOp(op Operation) string

func FilterAuthHeader

func FilterAuthHeader(name string, skipAuth bool) bool

func OpenAPIVersion

func OpenAPIVersion(doc *openapi3.T) string

func ParamLocationOK

func ParamLocationOK(in string) bool

func PreferJSONMedia

func PreferJSONMedia(content openapi3.Content) *openapi3.MediaType

func SchemaMap

func SchemaMap(ref *openapi3.SchemaRef) map[string]any

func SpecTitle

func SpecTitle(doc *openapi3.T) string

func SpecVersion

func SpecVersion(doc *openapi3.T) string

func SuccessResponse

func SuccessResponse(responses *openapi3.Responses) (*openapi3.ResponseRef, string)

Types

type LoadResult

type LoadResult struct {
	Doc      *openapi3.T
	Raw      []byte
	SpecHash string
	Source   string
}

func Load

func Load(spec string, maxBytes int64, timeout time.Duration) (*LoadResult, error)

type Operation

type Operation struct {
	Method      string
	Path        string
	OperationID string
	Summary     string
	Description string
	Deprecated  bool
	Parameters  openapi3.Parameters
	RequestBody *openapi3.RequestBodyRef
	Responses   *openapi3.Responses
}

func Enumerate

func Enumerate(doc *openapi3.T, includeDeprecated bool) []Operation

Jump to

Keyboard shortcuts

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