config

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2025 License: Apache-2.0 Imports: 5 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 `mapstructure:"x-openapi-filter"`
	FilterConfig `mapstructure:",squash"`
}

func LoadConfig

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

type FilterComponentsConfig

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

type FilterConfig

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

type LoaderConfig added in v0.3.0

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

type LoggerConfig

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

type ToolConfig

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

Jump to

Keyboard shortcuts

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