GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - rust-codegen-group/openapi-nexus: OpenAPI 3.x code generator for deterministic, type-safe SDKs and API tooling across languages and runtimes.

BranchesTags
Open more actions menu

Latest commit

 

History

335 Commits
335 Commits

Folders and files

NameName
Last commit message
Last commit date
.github/workflows
.github/workflows
 
 
build_support
build_support
 
 
docs
docs
 
 
examples/multipart-binary
examples/multipart-binary
 
 
fixture-generators
fixture-generators
 
 
just
just
 
 
scripts
scripts
 
 
src
src
 
 
tests
tests
 
 
.gitignore
.gitignore
 
 
CHANGELOG.md
CHANGELOG.md
 
 
Cargo.lock
Cargo.lock
 
 
Cargo.toml
Cargo.toml
 
 
Justfile
Justfile
 
 
LICENSE-APACHE
LICENSE-APACHE
 
 
LICENSE-MIT
LICENSE-MIT
 
 
README.md
README.md
 
 
build.rs
build.rs
 
 
dist-workspace.toml
dist-workspace.toml
 
 
openapi-nexus-config.toml.example
openapi-nexus-config.toml.example
 
 
rust-toolchain.toml
rust-toolchain.toml
 
 
test_fixture_rejections.txt
test_fixture_rejections.txt
 
 
test_fixture_skip_paths.txt
test_fixture_skip_paths.txt
 
 

Repository files navigation

OpenAPI Nexus

OpenAPI 3.0 / 3.1 / 3.2 to multi-language code generator

CI codecov License Rust

OpenAPI Nexus transforms OpenAPI specifications into type-safe client libraries. Generated output is deterministic, compile-checked in CI, and tested byte-for-byte via golden tests.

Language Support

Language Generator HTTP Client Status
TypeScript typescript-fetch fetch Beta
Go go-http net/http Beta
Rust rust-reqwest reqwest Beta
Rust rust-ureq ureq Beta
Rust rust-aioduct aioduct Beta
Python python-httpx httpx Beta
Python python-requests requests Beta
Java java-okhttp OkHttp Beta
Kotlin kotlin-okhttp OkHttp Beta

Quick Start

Install

Shell installer (no Rust toolchain needed):

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/rust-codegen-group/openapi-nexus/releases/download/0.3.0/openapi-nexus-installer.sh | sh

Build from source:

cargo install openapi-nexus

Requires Rust 1.90+.

Generate

# TypeScript client
openapi-nexus generate -i spec.yaml -o output --generators typescript-fetch

# Go client
openapi-nexus generate -i spec.yaml -o output --generators go-http

# Rust client (reqwest)
openapi-nexus generate -i spec.yaml -o output --generators rust-reqwest

# Python client (httpx)
openapi-nexus generate -i spec.yaml -o output --generators python-httpx

# Java client
openapi-nexus generate -i spec.yaml -o output --generators java-okhttp

# Generate another target into its own directory
openapi-nexus generate -i spec.yaml -o output/go --generators go-http
openapi-nexus generate -i spec.yaml -o output/rust --generators rust-reqwest

Configuration

Configuration resolves in order: CLI args > environment variables (OPENAPI_NEXUS_*) > config file (openapi-nexus-config.toml) > defaults.

# Environment variables
export OPENAPI_NEXUS_INPUT="spec.yaml"
export OPENAPI_NEXUS_OUTPUT="generated"
export OPENAPI_NEXUS_GENERATORS="typescript-fetch"

Generator-specific options go in the config file:

[generators.go-http]
module_path = "github.com/myorg/myproject/sdk"

[generators.rust-reqwest]
workspace_mode = true
workspace_deps = "workspace_version"

[generators.rust-reqwest.extra_derives.structs]
derives = ["PartialEq"]

[generators.rust-reqwest.extra_derives.enums]
derives = ["Hash"]

[generators.rust-reqwest.utoipa]
enabled = true
dependency = '{ version = "5" }'

[generators.rust-aioduct.aioduct]
compression = ["gzip", "zstd"]
features = ["tracing"]

[generators.typescript-fetch]
emit_enum_constants = true
emit_type_guards = true
property_naming = "camelCase"

How It Works

OpenAPI YAML/JSON → parse → lower to IR → CodeGenerator::generate(&IrSpec) → write

Parsing auto-detects OAS version (3.0, 3.1, 3.2). Lowering produces a version-agnostic IrSpec. Each generator receives the pre-lowered IR and uses sigil-stitch for type-safe code emission.

Documentation

Full documentation is available at the project docs site.

Examples live under examples/, including multipart file upload and raw binary body usage in examples/multipart-binary.

Development

# Run all tests
cargo test

# Clippy (required before commit)
cargo clippy --all-targets --all-features -- -D warnings

# Update golden files after intentional output changes
UPDATE_GOLDEN=1 cargo test

# Compile-check generated output for all languages
just golden-build-all

License

Dual-licensed under MIT or Apache-2.0 at your option.

About

OpenAPI 3.x code generator for deterministic, type-safe SDKs and API tooling across languages and runtimes.

rust-codegen-group.github.io/openapi-nexus/

Topics

api-toolsclicode-generationcodegenopenapiopenapi3sdk-generatortype-safe

Resources

Readme
Activity
Custom properties

Stars

92 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Used by

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.