nori/config
Config file support for the OpenAPI code generator.
Loads a YAML config file that specifies which targets to generate, output directories, and target-specific options.
Types
Top-level configuration.
pub type Config {
Config(spec: String, output: OutputConfig)
}
Constructors
-
Config(spec: String, output: OutputConfig)
Errors that can occur when loading a config file.
pub type ConfigError {
ConfigFileNotFound(path: String)
ConfigParseError(message: String)
}
Constructors
-
ConfigFileNotFound(path: String) -
ConfigParseError(message: String)
Output configuration for all targets.
pub type OutputConfig {
OutputConfig(
gleam: TargetConfig,
typescript: TargetConfig,
react_query: TargetConfig,
swr: TargetConfig,
fetch: TargetConfig,
)
}
Constructors
-
OutputConfig( gleam: TargetConfig, typescript: TargetConfig, react_query: TargetConfig, swr: TargetConfig, fetch: TargetConfig, )
Values
pub fn default_target(dir: String, suffix: Bool) -> TargetConfig
Creates a default target config with the given dir and suffix setting.