Expand description
Configuration for mock generation from OpenAPI specifications
This module provides configuration management for the mockforge generate command,
allowing users to customize the mock generation process through configuration files.
§Supported Formats
mockforge.toml(recommended, type-safe)mockforge.json(JSON format)mockforge.yamlormockforge.yml(YAML format)
§Priority Order
- CLI arguments (highest precedence)
- Configuration file
- Environment variables
- Default values (lowest precedence)
§Example Configuration
[input]
spec = "openapi.json"
[output]
path = "./generated"
filename = "mock-server.rs"
[plugins]
oas-types = { package = "oas-types" }
[options]
client = "reqwest"
mode = "tags"Structs§
- Generate
Config - Configuration for mock generation
- Generate
Options - Generation options
- Input
Config - Input specification configuration
- Output
Config - Output configuration
Enums§
- Barrel
Type - Barrel file type for organizing exports
- Plugin
Config - Plugin configuration
Functions§
- discover_
config_ file - Discovery configuration file paths in the current directory
- load_
generate_ config - Load configuration from a file
- load_
generate_ config_ with_ fallback - Load configuration with fallback to defaults
- save_
generate_ config - Save configuration to a file