Changelog: Early Access for Universal Typescript SDK and SDK Docs

New features to the Speakeasy Platform - November 30th, 2023.

Background image

Welcome to another edition of the Speakeasy Changelog. In this issue, we will give you a sneak peek into products rolling hot off the press--our latest Typescript release as well as SDK Documentation.

Sound good?

Ok, let’s go! πŸš€

(Early Access) Universal Typescript SDK

We're super excited to announce early access to our newest Typescript SDK. This SDK is designed to be a truly universal interface created to run on servers and in the browser, and in any Javascript runtime! Powered by fetch (opens in a new tab) and Zod (opens in a new tab), it has a minimal code footprint while providing a rich toolkit for one of the fastest-growing and evolving language communities. Other goodies include:

  • Built-in runtime validation for types,
  • Support for union types and Bigints,
  • Native streaming upload and download support. Got an AI product that streams megabytes of data per request and response? No problem, we've got your users covered.

Check out that slick interface:


import { Speakeasybar } from "speakeasy";
import { DrinkType } from "speakeasy";
async function run() {
const sdk = new Speakeasybar({
apiKey: "my_key",
});
const drinkType = DrinkType.Spirit;
const res = await sdk.drinks.listDrinks(drinkType);
if (res?.statusCode !== 200) {
throw new Error("Unexpected status code: " + res?.statusCode || "-");
}
// handle response
}
run();

Read more about it here! Or join our Slack (opens in a new tab) for early access!

(Early Access) SDK Documentation

We're also excited to announce SDK Docs into early access! We've always believed that great developer experience starts with type safe experiences and rapid time to 200s. We believe this should extend to your documentation as well. That's why we're releasing support for generating great SDK docs straight from your OpenAPI spec. Get a fully working NextJS powered app with embedded usage snippets just by running speakeasy generate docs .... ! Or plug into our automation and get a working docs site that stays up to date with every API and SDK change.

API docs with SDKs featured

We've built SDK docs to provide a language-specific guide that gets your users to a fully working integration with just a single copy-paste. Let's face it: 3-pane API references are out of date! It's time for something new.

Join our Slack (opens in a new tab) to get early access to SDK Docs!

New OpenAPI Guides:

We have two new posts in our OpenAPI tips series covering best practices when working with tags and servers in your OpenAPI document. These simple concepts, when used effectively, can greatly improve the developer experience for your end users.

  • Working with Servers: The servers block can be a great way to provide your users with convenient access to production, staging, sandbox and other environments you might have. Maybe your API supports tenancy? No problem! You can template out your server endpoints with variables.

  • Working with Tags: Tags can be your best friend when organising your API resources into logical groups for your users. sdk.payments.list ? That's nice and easy to use :)

🚒 Improvements and Bug Fixes πŸ›

Speakeasy v1.125.1 (opens in a new tab)

🚒 Improved preferred usage examples selection
🚒 Server selection section automatically added to Readmes
🚒 Complex serialization of deep objects in additionalProperties

Terraform

πŸ› Importing of external array of enums

Python

πŸ› Unused imports in Python for errors
πŸ› Relaxed urllib3 dependency in Python to support boto3

Java

🚒 Nullable support
🚒 Header capture in operation responses

C#

🚒 Support for server variables
πŸ› Class names conflicting with namespaces and SDKs in C#/Unity

CTA background illustrations

Start to Speakeasy!

Create great integration experiences for your APIs