Help us shape the future of Go! Take the 2026 Go Developer Survey

openapi

package
v2.1.8 Latest Latest
Warning

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

Go to latest
Published: Sep 4, 2026 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterFromFS

func RegisterFromFS(reg *Registry, f fs.FS, dir string) error

RegisterFromFS registers all .json specs from an embedded FS directory.

func ServeIndex

func ServeIndex(reg *Registry) http.HandlerFunc

func ServeSpec

func ServeSpec(reg *Registry) http.HandlerFunc

Types

type Registry

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

func NewRegistry

func NewRegistry() *Registry

func (*Registry) Add

func (r *Registry) Add(spec Spec)

func (*Registry) Get

func (r *Registry) Get(name string) (Spec, bool)

func (*Registry) List

func (r *Registry) List() []Spec

type Spec

type Spec struct {
	Name     string
	Filename string
	Content  []byte
}

Jump to

Keyboard shortcuts

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