A Rust crate for generating language-specific SDKs from OpenAPI specifications.
The XDK Generator is a powerful tool that automatically generates Software Development Kits (SDKs) for various programming languages based on OpenAPI specifications. It provides a modular and extensible framework for creating language-specific SDK generators.
- Modular architecture for language-specific generators
- Built on top of
xdk-libfor common operations - Uses OpenAPI specifications as input
- Template-based code generation using
minijinja - Extensible design for adding new language support
Currently supports:
- Python
Add the following to your Cargo.toml:
[dependencies]
xdk-gen = "0.1.0"To create a generator for a new language:
- Create a new module folder (e.g.,
javascript/) - Implement the following required files:
mod.rs: Module exports and potentially testsgenerator.rs: Implementation of the generator using thelanguage!macro
Everything else (parsing, utilities, error handling) is abstracted in the xdk-lib crate.
xdk-openapi: For OpenAPI specification handlingxdk-lib: Core library for common operationsminijinja: Template engine for code generationserde: Serialization/deserializationserde_json: JSON handlingthiserror: Error handling
See the python module for a reference implementation of a language generator.
[Add your license information here]
[Add contribution guidelines here]