oaspec/codegen/context

Types

Context for code generation, carrying all needed state.

pub type Context {
  Context(spec: spec.OpenApiSpec, config: config.Config)
}

Constructors

A generated file with its path and content.

pub type GeneratedFile {
  GeneratedFile(path: String, content: String)
}

Constructors

  • GeneratedFile(path: String, content: String)

Values

pub fn new(
  spec: spec.OpenApiSpec,
  config: config.Config,
) -> Context

Create a new generation context.

pub const version: String

The version of oaspec used for generated code headers.

Search Document