Background image
Featured blog post image

Custom code regions & an Overlay playground!

The Speakeasy generator just got more flexible, and writing overlays just got even easier

πŸŽ‰ Welcome to our first changelog of 2025! This update focuses on customization, introducing powerful tools like Custom Code Regions for direct SDK enhancements and the Overlay Playground, a new open-source tool for modular spec-level changes. These features, combined with other improvements and fixes, make tailoring your SDKs and OpenAPI workflows easier than ever. Let’s explore what’s new!

Custom Code Regions

codeRegions.ts
import { ClientSDK } from "./lib/sdks.js";
// #region imports
import chalk from 'chalk';
// #endregion imports
class Acme extends ClientSDK {
// ... generated code ...
// #region sdk-class-body
greet(name: string): string {
return chalk.green(`Hello, ${name}!`);
}
// #endregion sdk-class-body
}

Custom Code Regions give you the flexibility to embed custom logic directly into your SDK without modifying the OpenAPI spec. Using foldable regions in your codebase, you can add anything from helper methods to third-party integrations. Your customizations persist across regenerations, keeping your work intact and formatted.

✨ Why choose Custom Code Regions?

  • Direct control: Insert your logic directly into the SDK.
  • Seamless updates: Custom code remains untouched during regenerations.
  • Ultimate flexibility: From logging to integrations, you can do anything.

How Does Everything Fit Together?

With Custom Code Regions, Hooks, and Overlays, Speakeasy offers three distinct ways to customize your SDKs:

Customization ToolPurposeKey Use Case
OverlaysModify the OpenAPI spec for structural or schema-related changes.Adding paths, tweaking parameters, or updating models.
HooksIntercept and modify SDK generation programmatically during the build.Dynamic updates, injecting logic at specific stages.
Custom Code RegionsInsert custom logic directly into the generated SDK code at runtime.Adding helper methods, third-party integrations, or SDK-specific tweaks.

Each tool offers unique capabilities, and together, they provide unparalleled flexibility for tailoring your SDKs to your needs.

πŸ“– Learn more in our release post:
πŸ”— Custom Code Regions: Ultimate SDK Customization

πŸ“š Dive into the documentation:
πŸ”— Custom Code Regions Documentation


Overlay Playground

The Overlay Playground (opens in a new tab) is an open-source tool for managing OpenAPI overlays in a more user-friendly way. Instead of dealing with raw YAML or JSON, you can create, edit, and validate overlays through a visual interface with real-time previews. Once you’re done, export your overlays and integrate them into your workflows or CI/CD pipeline. Whether you work solo or with a team, the Playground can reduce the complexity of overlay management.

Key Features

  • Interactive Editor: A visual editor for overlays with real-time updates.
  • Validation: Ensures overlays conform to OpenAPI standards.
  • Export and Share: Save overlays as reusable .overlay.yaml files.
  • Open Source: Fully extensible and open for contributions at github.com/speakeasy-api/jsonpath (opens in a new tab).

Start customizing your OpenAPI specs today with the Overlay Playground at overlay.speakeasy.com (opens in a new tab). 🌟


🐝 New Features and Bug Fixes πŸ›

Info Icon

NOTE

Β  Based on the most recent CLI version: Speakeasy v1.493.8 (opens in a new tab)

Generation Platform

🐝 Feat: enabled feature flag-based licensing
🐝 Feat: defaulted to API key authentication when a security scheme is missing
πŸ› Fix: resolved test generation issues and improved enum handling

Python

🐝 Feat: upgraded to Poetry 2.0 for modern dependency management
🐝 Feat: bumped minimum Python version to 3.9
🐝 Feat: exposed SDK versioning data as constants
πŸ› Fix: added missing imports for per-operation servers
πŸ› Fix: updated Mypy for Python 3.13 compatibility

TypeScript

🐝 Feat: added support for asymmetric webhook signatures
πŸ› Fix: improved webhook security parsing

Go

πŸ› Fix: standardized deprecated comments for linter compatibility

Java

🐝 Feat: added support for JUnit test report generation

Ruby

🐝 Feat: updated bundler for Ruby 3.4 support