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
- func LanguageConfigHasMaintainTagBasedOrdering(langConfig config.LanguageConfig) bool
- type Config
- func (c *Config) AddOverlay(overlay map[string]any)
- func (c *Config) DocsDisabled() bool
- func (c *Config) Documentation() string
- func (c *Config) GetLanguageConfig(target string) *config.LanguageConfig
- func (c *Config) GetLanguageConfigValue(key string) any
- func (c *Config) GetSequencedMapIterationOrder() sequencedmap.OrderType
- func (c *Config) HoistGlobalSecurity() bool
- func (c *Config) IsMintlify() bool
- func (c *Config) MaintainOpenAPIOrder() bool
- func (c *Config) Resolve(target types.Target, outDir string, fs filesystem.FileSystem) error
- type ImportConfig
- func (c ImportConfig) GetCallbacksPath() string
- func (c ImportConfig) GetErrorsPath() string
- func (c ImportConfig) GetImportPath(scope ast.Scope) string
- func (c ImportConfig) GetOperationsPath() string
- func (c ImportConfig) GetResourcesPath() string
- func (c ImportConfig) GetSharedPath() string
- func (c ImportConfig) GetWebhooksPath() string
- type ImportOption
Constants ¶
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 (*Config) AddOverlay ¶
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 ¶
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 (GEN-3101).
func (*Config) Documentation ¶
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 (*Config) GetSequencedMapIterationOrder ¶
func (c *Config) GetSequencedMapIterationOrder() sequencedmap.OrderType
func (*Config) HoistGlobalSecurity ¶
func (*Config) IsMintlify ¶
IsMintlify reports whether documentation should be emitted as Mintlify MDX.
func (*Config) MaintainOpenAPIOrder ¶
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