openapi

package
v1.0.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2026 License: MIT Imports: 26 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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