Command Palette

Search for a command to run...

OpenAPI Specification

Download OpenAPI spec and generate clients

Type-Safe Development
LeakZero provides comprehensive OpenAPI 3.0 specifications for our entire API surface. Generate fully type-safe clients in any language, enabling faster development with compile-time safety and intelligent IDE support. Experience the future of API integration with zero manual typing and maximum reliability.

Download OpenAPI Specification

LeakZero OpenAPI Specification
Complete API specification in OpenAPI 3.0 format for client generation

leakzero-openapi-spec.json

Complete API specification with all endpoints, schemas, and examples

Always Up-to-Date
Our OpenAPI specification is automatically generated from the live API, ensuring 100% accuracy and immediate availability of new features and endpoints.

Why Use OpenAPI Client Generation

Development Velocity

Generate complete, type-safe API clients in minutes instead of hours. Eliminate manual API integration work and focus on your core security logic.

Zero manual typing or HTTP client setup
Automatic request/response serialization
Built-in authentication handling
IDE autocomplete and IntelliSense support
Type Safety & Reliability

Catch integration errors at compile-time, not runtime. Generated clients provide complete type safety for all API interactions.

Compile-time error detection
Guaranteed API compatibility
Automatic API version updates
Validated request/response schemas

Client Generation Guide

TypeScript / JavaScript
Generate type-safe clients for Node.js and browser environments

Recommended: OpenAPI Generator

# Install generator
npm install @openapitools/openapi-generator-cli -g
# Generate client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g typescript-fetch \
-o ./leakzero-client
Pros: Full TypeScript support, fetch-based, tree-shakable

Alternative: Swagger Codegen

# Via Docker
docker run --rm -v $PWD:/local \
swaggerapi/swagger-codegen-cli generate \
-i /local/leakzero-openapi-spec.json \
-l typescript-fetch \
-o /local/client
Pros: Docker-based, no local dependencies
Python
Generate Python clients with requests or httpx support

Recommended: OpenAPI Python Client

# Install generator
pip install openapi-python-client
# Generate client
openapi-python-client generate \
--path leakzero-openapi-spec.json \
--config client-config.yaml
Pros: Modern async/await, pydantic models, mypy support

Alternative: OpenAPI Generator

# Generate Python client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g python \
-o ./leakzero-python-client \
--additional-properties=packageName=leakzero
Pros: Battle-tested, extensive configuration options
Go
Generate idiomatic Go clients with proper error handling

Recommended: oapi-codegen

# Install generator
go install github.com/deepmap/oapi-codegen/cmd/oapi-codegen@latest
# Generate client
oapi-codegen -package leakzero \
-generate client,types \
leakzero-openapi-spec.json > client.go
Pros: Idiomatic Go, minimal dependencies, fast compilation

Alternative: OpenAPI Generator

# Generate Go client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g go \
-o ./leakzero-go-client \
--additional-properties=packageName=leakzero
Pros: Comprehensive features, extensive customization
C++
Generate modern C++ clients with RAII and exception safety

Recommended: OpenAPI Generator (cpp-restsdk)

# Generate C++ client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g cpp-restsdk \
-o ./leakzero-cpp-client \
--additional-properties=modelNamespace=LeakZero
Pros: Modern C++, async support, cross-platform

Alternative: cpp-qt-client

# For Qt applications
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g cpp-qt-client \
-o ./leakzero-qt-client
Pros: Qt integration, signals/slots, GUI applications
PHP
Generate PSR-compliant PHP clients with modern PHP features

Recommended: OpenAPI Generator (php)

# Generate PHP client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g php \
-o ./leakzero-php-client \
--additional-properties=packageName=LeakZero
Pros: PSR-4 autoloading, composer ready, modern PHP

Alternative: Jane OpenAPI

# Install Jane
composer require --dev jane-php/open-api
# Generate client
vendor/bin/jane-openapi generate \
leakzero-openapi-spec.json \
src/Generated
Pros: Symfony integration, advanced serialization
Ruby
Generate Ruby gems with idiomatic Ruby conventions

Recommended: OpenAPI Generator (ruby)

# Generate Ruby gem
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g ruby \
-o ./leakzero-ruby-client \
--additional-properties=gemName=leakzero
Pros: Complete gem structure, RSpec tests, yard docs

Alternative: Swagger Codegen

# Using Swagger Codegen
swagger-codegen generate \
-i leakzero-openapi-spec.json \
-l ruby \
-o ./leakzero-ruby
Pros: Lightweight, minimal dependencies
Java
Generate Java clients with Spring Boot and Maven/Gradle support

Recommended: OpenAPI Generator (java)

# Generate Java client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g java \
-o ./leakzero-java-client \
--additional-properties=library=okhttp-gson
Pros: Multiple HTTP libraries, Maven/Gradle, comprehensive

Alternative: Spring Boot (reactive)

# For reactive applications
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g java \
-o ./leakzero-reactive-client \
--additional-properties=library=webclient
Pros: Spring WebFlux, non-blocking, reactive streams
Rust
Generate memory-safe Rust clients with async/await support

Recommended: OpenAPI Generator (rust)

# Generate Rust client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g rust \
-o ./leakzero-rust-client \
--additional-properties=packageName=leakzero
Pros: Reqwest-based, async/await, serde integration

Alternative: Progenitor

# Using Progenitor
cargo install progenitor
# Generate client
progenitor \
-i leakzero-openapi-spec.json \
-o src/client.rs
Pros: Oxide Computer's tool, high-quality output
Dart / Flutter
Generate Dart clients for Flutter mobile and web applications

Recommended: OpenAPI Generator (dart)

# Generate Dart client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g dart \
-o ./leakzero-dart-client \
--additional-properties=pubName=leakzero
Pros: Flutter compatible, pub.dev ready, null safety

Alternative: dart-dio

# For Dio HTTP client
openapi-generator-cli generate \
-i leakzero-openapi-spec.json \
-g dart-dio \
-o ./leakzero-dart-dio-client
Pros: Dio interceptors, advanced features, file uploads

Best Practices

Configuration Tips

Use Custom Templates

Override default templates for better code organization

Configure Package Names

Set appropriate package/namespace names for your project

Version Control Integration

Include generation commands in your build pipeline

Regular Updates

Regenerate clients when the API specification changes

Integration Guidelines

Environment Configuration

Configure base URLs and API keys through environment variables

Error Handling

Implement proper error handling for rate limits and API errors

Testing Strategy

Mock generated clients for unit tests and integration tests

Documentation

Generated clients include comprehensive API documentation

Additional Resources

Helpful Links & Documentation
External resources for OpenAPI client generation
Documentation - LeakZero | LeakZero