config

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigPathEmpty = errors.New("config path is empty")

Functions

This section is empty.

Types

type Config added in v0.3.0

type Config struct {
	Tool         ToolConfig `koanf:"x-openapi-filter"`
	FilterConfig `koanf:",squash"`
}

func LoadConfig

func LoadConfig(configPath string) (*Config, error)

type FilterComponentsConfig

type FilterComponentsConfig struct {
	Schemas         []string `koanf:"schemas"`
	Parameters      []string `koanf:"parameters"`
	SecuritySchemes []string `koanf:"securitySchemes"`
	RequestBodies   []string `koanf:"requestBodies"`
	Responses       []string `koanf:"responses"`
	Headers         []string `koanf:"headers"`
	Examples        []string `koanf:"examples"`
	Links           []string `koanf:"links"`
	Callbacks       []string `koanf:"callbacks"`
}

type FilterConfig

type FilterConfig struct {
	Servers      bool                    `koanf:"servers"`
	Paths        map[string][]string     `koanf:"paths"`
	Components   *FilterComponentsConfig `koanf:"components"`
	Security     bool                    `koanf:"security"`
	Tags         bool                    `koanf:"tags"`
	ExternalDocs bool                    `koanf:"externalDocs"`
}

type LoaderConfig added in v0.3.0

type LoaderConfig struct {
	IsExternalRefsAllowed bool `koanf:"external_refs_allowed"`
}

type LoggerConfig

type LoggerConfig struct {
	Level string `koanf:"level"`
}

type ToolConfig

type ToolConfig struct {
	Logger *LoggerConfig `koanf:"logger"`
	Loader *LoaderConfig `koanf:"loader"`
}

Jump to

Keyboard shortcuts

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