openapi

package
v0.30.113 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: MIT Imports: 25 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ExtraComponents added in v0.23.0

func ExtraComponents(components ...any) func(*Installer)

ExtraComponents provides additional components to include schemas for.

func Handler

func Handler(docs map[string]*openapi3.T, enableCors bool) http.HandlerFunc

func Surrogates added in v0.24.0

func Surrogates(surrogates map[reflect.Type]any) func(*Installer)

Types

type Config added in v0.30.38

type Config struct {
	AuthorizationUrl string
	TokenUrl         string
	ClientId         string
	Scopes           []struct {
		Name        string
		Description string
	}
	OpenIdConnectUrl string
}

Config defines the configuration for openapi/swagger support.

func (*Config) ScopeMap added in v0.30.41

func (c *Config) ScopeMap() map[string]string

func (*Config) ScopeNames added in v0.30.41

func (c *Config) ScopeNames() []string

type Installer

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

Installer configures openapi support.

func Feature

func Feature(
	base *openapi3.T,
	config ...func(*Installer),
) *Installer

Feature configures http server support

func (*Installer) AfterInstall

func (i *Installer) AfterInstall(
	_ *setup.Builder,
	handler miruken.Handler,
) error

func (*Installer) BindingCreated

func (i *Installer) BindingCreated(
	policy miruken.Policy,
	handlerInfo *miruken.HandlerInfo,
	binding miruken.Binding,
)

func (*Installer) DependsOn

func (i *Installer) DependsOn() []setup.Feature

func (*Installer) Docs added in v0.28.0

func (i *Installer) Docs() map[string]*openapi3.T

func (*Installer) HandlerInfoCreated added in v0.30.25

func (i *Installer) HandlerInfoCreated(
	_ *miruken.HandlerInfo,
)

func (*Installer) Install

func (i *Installer) Install(b *setup.Builder) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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