Background image
Featured blog post image

Label-Based Versioning, OpenAPI Transformations, and Overlay Insights

New features to the Speakeasy Platform - November 13, 2024

Ever wished managing SDK versions was as simple as adding a label? Or wanted your OpenAPI transformations to just work™️ every time you regenerate? We’ve got you covered with some powerful new features that will make iterating on your SDK a breeze.

GitHub-Native Version Management

Managing SDK versions should be as natural as any other GitHub workflow. Now it is! With label-based versioning, you can control your SDK’s version bumps right from your pull request:

  • Automated Version Detection: By default, we’ll analyze your changes and suggest the appropriate semantic version bump. You’ll see our suggested version label on your generated PR.
  • Manual Override: Want to override our suggestion? Just remove the current label and add a major, minor, or patch label to your PR.
  • Persistent Preferences: Your chosen version bump persists across regenerations until you change it.
  • Pre-release Support: Planning a beta release? When you are ready to move off your pre-release, simply add the label graduate.

This feature is automatically active in all SDK generation workflows today. If you would also like generation to kick off immediately after adding a label, just add the following to your GitHub workflow file:

name: Generate
permissions:
checks: write
contents: write
pull-requests: write
statuses: write
"on":
workflow_dispatch:
inputs:
force:
description: Force generation of SDKs
type: boolean
default: false
push_code_samples_only:
description: Force push only code samples from SDK generation
type: boolean
default: false
set_version:
description: optionally set a specific SDK version
type: string
pull_request:
types: [labeled]
schedule:
- cron: 0 0 * * *

OpenAPI Transformations

workflow.yaml
workflowVersion: 1.0.0
speakeasyVersion: latest
sources:
my-source:
inputs:
- location: ./openapi.yaml
transformations:
- removeUnused: true
- filterOperations:
operations: getPets, createPet
include: true # exclude: true
- cleanup: true

OpenAPI transformations are now a first-class citizen in your generation workflow. Instead of manually running transforms or building custom pipelines, transformations are automatically applied every time your SDK is generated.

Available transforms:

  • filterOperations: Include or exclude specific operations from your SDK
  • removeUnused: Automatically clean up unused schemas and components
  • cleanup: Fix and standardize your OpenAPI spec’s formatting

The best part? Transformations adapt to your spec changes. For example, if you’re filtering to include specific operations, newly added operations matching your filter will automatically flow through to your SDK.

Overlay Summaries

When applying OpenAPI overlays, it’s crucial to understand exactly how they’re modifying your spec. Our new overlay summaries provide clear, actionable insights into the changes.

These summaries help you:

  • Quickly validate your overlay changes,
  • Understand the impact on your API spec,
  • Debug overlay application issues.

🐝 New features and bug fixes 🐛

Info Icon

NOTE

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

Generation platform

🐝 Feat: improved markdown tables in README.md
🐝 Feat: defaultErrorName config param added to enable custom naming of unhandled API error class
🐛 Fix: improved handling of complex allOf schemas that merge multiple types
🐛 Fix: remove duplication of error types
🐝 Feat: warn users about optional request bodies

PHP

🐝 Feat: replace JMS serializer with custom serializer for better union support
🐝 Feat: handle multiple servers
🐛 Fix: ensure PHP compile dependency version matches composer

Terraform

🐝 Feat: added default object support
🐝 Feat: new x-speakeasy-terraform-alias-to extension for mapping to specific values in an array
🐝 Feat: support default empty array in terraform
🐛 Fix: prevent compilation errors caused by missing response schemas

Java

🐝 Feat: support added for additionalProperties

Python

🐛 Fix: Prevent compilation errors on macOS, and if the source code directory changes

TypeScript

🐝 Feat: allow hooks to trigger retries in TS SDKs