# custom-code-regions-an-overlay-playground
Source: https://speakeasy.com/blog/custom-code-regions-an-overlay-playground


import { Callout, ReactPlayer } from "@/lib/mdx/components";

🎉 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

```typescript filename="codeRegions.ts"
// !mark gold
// #region imports
import chalk from "chalk";
import { ClientSDK } from "./lib/sdks.js";

// !mark gold
// #endregion imports

class Acme extends ClientSDK {
  // ... generated code ...
  // !mark gold
  // #region sdk-class-body
  greet(name: string): string {
    return chalk.green(`Hello, ${name}!`);
  }
  // !mark gold
  // #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 Tool**  | **Purpose**                                                            | **Key Use Case**                                                         |
| ----------------------- | ---------------------------------------------------------------------- | ------------------------------------------------------------------------ |
| **Overlays**            | Modify the OpenAPI spec for structural or schema-related changes.      | Adding paths, tweaking parameters, or updating models.                   |
| **Hooks**               | Intercept and modify SDK generation programmatically during the build. | Dynamic updates, injecting logic at specific stages.                     |
| **Custom Code Regions** | Insert 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](/post/release-custom-code-regions)

> 📚 Dive into the documentation:  
> 🔗 [Custom Code Regions Documentation](/docs/customize/code/code-regions/overview)

---

## Overlay Playground

The [**Overlay Playground**](https://overlay.speakeasy.com) 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.

<div className="mt-10">
  <ReactPlayer
    controls={false}
    loop={true}
    playing={true}
    url="./assets/overlay-playground.mp4"
    volume={0}
  />
</div>

#### **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](https://github.com/speakeasy-api/jsonpath).

Start customizing your OpenAPI specs today with the Overlay Playground at [overlay.speakeasy.com](https://overlay.speakeasy.com). 🌟

---

## 🐝 New Features and Bug Fixes 🐛

<Callout title="Note" type="info">
  Based on the most recent CLI version: [**Speakeasy
  v1.493.8**](https://github.com/speakeasy-api/openapi-generation/releases/tag/v2.493.8)
</Callout>

### 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