configuration

package
v2.937.11 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2026 License: AGPL-3.0 Imports: 9 Imported by: 0

Documentation

Overview

Package configuration contains functionality for target-specific configurations that are available to customers. Generally referred to as the "LangCfg".

Refer to the targetconfig package functionality for the configuration passed from the target to the generator, such as compile commands, features, etc.

Index

Constants

View Source
const (
	// DocumentationStandard emits per-operation `.md` docs unchanged. Default.
	DocumentationStandard = "standard"
	// DocumentationMintlify converts `docs/**/*.md` into Mintlify-flavored MDX.
	DocumentationMintlify = "mintlify"
	// DocumentationNone disables per-operation documentation generation entirely.
	DocumentationNone = "none"
)

Documentation output modes for `generation.documentation` in gen.yaml.

Variables

This section is empty.

Functions

func LanguageConfigHasMaintainTagBasedOrdering

func LanguageConfigHasMaintainTagBasedOrdering(langConfig config.LanguageConfig) bool

Returns true if the given language configuration has the "maintainTagBasedOrdering" setting enabled.

Types

type Config

type Config struct {
	config.Configuration
	// contains filtered or unexported fields
}

func New

func New(cfg *config.Configuration, target string) *Config

func (*Config) AddOverlay

func (c *Config) AddOverlay(overlay map[string]any)

AddOverlay adds and overlay to be applied to the language configuration note: this will be applied to each language configuration in the config currently

func (*Config) DocsDisabled

func (c *Config) DocsDisabled() bool

DocsDisabled reports whether per-operation documentation generation is turned off entirely (`generation.documentation: none`). When true, the generator skips writing `docs/**/*.md` files rather than emitting and then deleting them — a first-class opt-out.

func (*Config) Documentation

func (c *Config) Documentation() string

Documentation returns the documentation output mode for the SDK. Reads `generation.documentation` from gen.yaml via the AdditionalProperties catch-all; defaults to DocumentationStandard when unset or non-string. Recognized values: "standard", "mintlify", "none".

func (*Config) GetLanguageConfig

func (c *Config) GetLanguageConfig(target string) *config.LanguageConfig

Returns an overlaid copy of the language configuration

func (*Config) GetLanguageConfigValue

func (c *Config) GetLanguageConfigValue(key string) any

func (*Config) GetSequencedMapIterationOrder

func (c *Config) GetSequencedMapIterationOrder() sequencedmap.OrderType

func (*Config) HoistGlobalSecurity

func (c *Config) HoistGlobalSecurity() bool

func (*Config) IsMintlify

func (c *Config) IsMintlify() bool

IsMintlify reports whether documentation should be emitted as Mintlify MDX.

func (*Config) MaintainOpenAPIOrder

func (c *Config) MaintainOpenAPIOrder() bool

func (*Config) Resolve

func (c *Config) Resolve(target types.Target, outDir string, fs filesystem.FileSystem) error

Resolve applies template-specific configuration resolution to the configuration

type ImportConfig

type ImportConfig struct {
	Option   ImportOption      `json:"option" yaml:"option"`
	Paths    map[string]string `json:"paths" yaml:"paths"`
	Relative bool              `json:"relative,omitempty" yaml:"relative,omitempty"`
}

ImportConfig represents the import path configuration for a particular language specifically where models should be generated

func (ImportConfig) GetCallbacksPath

func (c ImportConfig) GetCallbacksPath() string

func (ImportConfig) GetErrorsPath

func (c ImportConfig) GetErrorsPath() string

func (ImportConfig) GetImportPath

func (c ImportConfig) GetImportPath(scope ast.Scope) string

func (ImportConfig) GetOperationsPath

func (c ImportConfig) GetOperationsPath() string

TODO in other options this won't be a singular path will need to rethink this

func (ImportConfig) GetResourcesPath

func (c ImportConfig) GetResourcesPath() string

GetResourcesPath returns the configured location for the public-export resources surface, or "" when unset. Implicit model-namespace exports are only rendered when this path is configured; explicit x-speakeasy-exports fall back to "resources" when it is not. Unlike the scope accessors this never panics: it is queried before the imports config is known to exist.

func (ImportConfig) GetSharedPath

func (c ImportConfig) GetSharedPath() string

func (ImportConfig) GetWebhooksPath

func (c ImportConfig) GetWebhooksPath() string

type ImportOption

type ImportOption string
const (
	ImportOptionOpenAPI ImportOption = "openapi"
)

Jump to

Keyboard shortcuts

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