Expand description
Code generation from OpenAPI and AsyncAPI schemas
Re-exports§
pub use formatters::Formatter;pub use formatters::HeaderMetadata;pub use formatters::Import;pub use formatters::PythonFormatter;pub use formatters::RubyFormatter;pub use formatters::Section;pub use formatters::TypeScriptFormatter;
Modules§
- common
- Common utilities for code generation across all language targets.
- formatters
- Formatters for language-specific code generation output
- quality
- Quality validation framework for generated code
- sql
- Glue between the CLI and
spikard_codegen::sql. - ts_
schema
Structs§
- Codegen
Engine - Code generation runtime orchestrating schema parsing and artifact generation
- Codegen
Request - Request executed by the code generation engine
- DtoConfig
- DTO configuration per language.
- Elixir
Generator - EnumDef
- Protobuf enum definition
- Enum
Value - Protobuf enum value
- Field
Def - Protobuf field definition
- Generated
Asset - Represents an asset emitted by the code generation engine
- GraphQL
Argument - Represents a GraphQL field argument
- GraphQL
Directive - Represents a GraphQL directive
- GraphQL
Enum Value - Represents an enum value
- GraphQL
Field - Represents a GraphQL field (on Object or Interface types)
- GraphQL
Input Field - Represents an input field (for
InputObjecttypes) - GraphQL
Schema - Parsed GraphQL schema representation
- GraphQL
Type - Represents a GraphQL type definition
- Message
Def - Protobuf message definition
- Method
Def - Protobuf RPC method definition
- PhpDto
Generator - PHP DTO generator
- PhpGenerator
- Protobuf
Schema - Parsed Protobuf schema representation
- Python
Generator - Ruby
Generator - Rust
Generator - Schema
Registry - Simple registry that lets generators resolve
$refidentifiers to concrete schemas. - Type
Script Generator
Enums§
- Codegen
Outcome - Output of the engine run
- Codegen
Target Kind - Type of artifact to generate for a schema
- Elixir
DtoStyle - Field
Label - Protocol Buffer field label
- Node
DtoStyle - PhpDto
Style - Proto
Type - Protocol Buffer type enumeration
- Protobuf
Target - Target specification for Protobuf code generation
- Protocol
- Protocol types supported by
AsyncAPI - Python
DtoStyle - Ruby
DtoStyle - Rust
DtoStyle - Schema
Kind - Code generation schema families supported by the CLI
- Target
Language - Supported target languages for code generation
- Type
Kind - GraphQL type category
Traits§
- Open
ApiGenerator - Base trait for
OpenAPIcode generators to eliminate duplication across languages. - Protobuf
Generator - Language-agnostic Protobuf code generator trait
Functions§
- detect_
primary_ protocol - Determine primary protocol from
AsyncAPIspec - generate_
elixir_ graphql - Generate Elixir GraphQL code from a schema.
- generate_
elixir_ protobuf - Generate Elixir Protobuf code from a schema.
- generate_
fixtures - Generate fixture files from message schemas
- generate_
from_ openapi - Generate server code from an
OpenAPIschema file - generate_
nodejs_ handler_ app - Generate Node.js handler scaffolding from
AsyncAPIspec - generate_
nodejs_ test_ app - Generate Node.js test application from
AsyncAPIspec - generate_
openrpc_ php_ handler_ app - Generate PHP handler scaffolding from
OpenRPCspec - generate_
openrpc_ python_ handler_ app - Generate Python handler scaffolding from
OpenRPCspec - generate_
openrpc_ ruby_ handler_ app - Generate Ruby handler scaffolding from
OpenRPCspec - generate_
openrpc_ rust_ handler_ app - Generate Rust handler scaffolding from
OpenRPCspec - generate_
openrpc_ typescript_ handler_ app - Generate TypeScript handler scaffolding from
OpenRPCspec - generate_
php_ graphql - Generate PHP GraphQL code from a schema
- generate_
php_ handler_ app - Generate PHP handler scaffolding from
AsyncAPIspec - generate_
php_ protobuf - Generate PHP Protobuf code from a schema
- generate_
python_ graphql - Generate Python GraphQL code from a schema
- generate_
python_ handler_ app - Generate Python handler scaffolding from
AsyncAPIspec - generate_
python_ protobuf - Generate Python Protobuf code from a schema
- generate_
python_ test_ app - Generate Python test application from
AsyncAPIspec - generate_
ruby_ graphql - Generate Ruby GraphQL code from a schema
- generate_
ruby_ handler_ app - Generate Ruby handler scaffolding from
AsyncAPIspec - generate_
ruby_ protobuf - Generate Ruby Protobuf code from a schema
- generate_
ruby_ test_ app - Generate Ruby test application from
AsyncAPIspec - generate_
rust_ graphql - Generate Rust GraphQL code from a schema
- generate_
rust_ handler_ app - Generate Rust handler scaffolding from
AsyncAPIspec - generate_
typescript_ graphql - Generate TypeScript GraphQL code from a schema
- generate_
typescript_ protobuf - Generate TypeScript Protobuf code from a schema
- parse_
asyncapi_ schema - Parse an
AsyncAPIv3 specification file - parse_
graphql_ schema - Auto-detect format and parse GraphQL schema
- parse_
graphql_ sdl - Parse GraphQL SDL from a file
- parse_
graphql_ sdl_ string - Parse GraphQL SDL from a string
- parse_
openapi_ schema - Parse an
OpenAPIschema from a file (JSON or YAML) - parse_
openrpc_ schema - Parse an
OpenRPC1.3.2 specification file - parse_
proto_ schema - Parse a Protobuf schema from a .proto file
- parse_
proto_ schema_ string - Parse a Protobuf schema from a string