openapi

package
v4.0.13 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TuneTypeFuncName = "TuneType"
)

Variables

This section is empty.

Functions

func AddSecurityScheme added in v4.0.13

func AddSecurityScheme(name string, sr *oa.SecuritySchemeRef)

func CodesForMethod added in v4.0.2

func CodesForMethod(method string) (codes []int)

func Compose

func Compose(logFacility *log.Facility, cfg *Config, httpCfg *config.Listener, prefix string) (result *oa.T, err error)

Types

type Config

type Config struct {
	APIversion string `toml:"api-version"`

	Title          string `toml:"title"`
	Description    string `toml:"description"`
	TermsOfService string `toml:"terms-of-service"`

	ContactName  string `toml:"contact-name"`
	ContactURL   string `toml:"contact-url"`
	ContactEmail string `toml:"contact-email"`

	LicenseName string `toml:"license-name"`
	LicenseURL  string `toml:"license-url"`

	Version string `toml:"version"`

	Server       string   `toml:"server"`
	ExtraServers []string `toml:"extra-servers"`
	Protocol     string   `toml:"protocol"`
	Host         string   `toml:"host"`
	Port         uint     `toml:"port"`
}

func (*Config) Check

func (x *Config) Check(cfg any) (err error)

Проверка валидности OpenAPI

type TuneType

type TuneType func() reflect.Type

Jump to

Keyboard shortcuts

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