oaspec/codegen/context
Types
Context for code generation, carrying all needed state.
pub type Context {
Context(spec: spec.OpenApiSpec, config: config.Config)
}
Constructors
-
Context(spec: spec.OpenApiSpec, config: config.Config)
Target for a generated file, indicating where it should be written.
pub type FileTarget {
SharedTarget
ServerTarget
ClientTarget
}
Constructors
-
SharedTarget -
ServerTarget -
ClientTarget
A generated file with its path, content, and output target.
pub type GeneratedFile {
GeneratedFile(
path: String,
content: String,
target: FileTarget,
)
}
Constructors
-
GeneratedFile(path: String, content: String, target: FileTarget)
Values
pub fn new(
spec: spec.OpenApiSpec,
config: config.Config,
) -> Context
Create a new generation context.