openapi

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2026 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefaultBuildFunc = func(r route.Router, fns ...BuildOptionFunc) *oas.OpenAPI {
	if v, ok := cached.Load(r); ok {
		return v.(*oas.OpenAPI)
	}
	o := FromRouter(r, fns...)
	cached.Store(r, o)
	return o
}

Functions

func FromRouter

func FromRouter(r route.Router, options ...BuildOptionFunc) *oas.OpenAPI

func RegisterPkgNamingPrefix

func RegisterPkgNamingPrefix(pkgPath string, prefix string)

Types

type BuildFunc

type BuildFunc func(r route.Router, fns ...BuildOptionFunc) *oas.OpenAPI

type BuildOption

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

type BuildOptionFunc

type BuildOptionFunc func(o *BuildOption)

func Naming

func Naming(naming func(t string) string) BuildOptionFunc

type PkgNamingPrefix

type PkgNamingPrefix map[string]string

func (PkgNamingPrefix) Prefix

func (p PkgNamingPrefix) Prefix(pkgPath string, name string) string

func (PkgNamingPrefix) Register

func (p PkgNamingPrefix) Register(pkgpath string, prefix string)

type ResponseContentSpecified

type ResponseContentSpecified interface {
	ResponseContent() any
}

type ResponseContentTypeSpecified

type ResponseContentTypeSpecified interface {
	ResponseContentType() string
}

type ResponseErrorsSpecified

type ResponseErrorsSpecified interface {
	ResponseErrors() []error
}

type ResponseStatusCodeSpecified

type ResponseStatusCodeSpecified interface {
	ResponseStatusCode() int
}

Jump to

Keyboard shortcuts

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