OpenAPI Studio, Laravel Integration, and 'what in Zod's name?'
New features to the Speakeasy Platform - September 30, 2024
If you like scrolling through yaml
& json
documents, ignore this update. If you’d be quite happy to get some help editing your OpenAPI spec, then read on!
And if last week’s PHP announcement got you excited, then prepare yourself for more good things: Laravel integration support!
AI-powered spec improvement with OpenAPI Studio
Speakeasy’s new AI-powered OpenAPI Studio has arrived!
Here’s what you can expect:
- AI-suggested improvements: Our AI will analyze your OpenAPI document and provide tailored suggestions to enhance it for optimal SDK creation.
- Local sync: the OpenAPI Studio stays in perfect sync with changes made to your locally saved spec to maintain a single source of truth.
- Clean versioning with overlays: All edits are saved in OpenAPI overlay files, keeping your root OpenAPI spec pristine while allowing for flexible, version-controlled improvements.
This feature is designed to streamline your workflow, ensuring your APIs are always primed for top-notch SDK generation.
Laravel-compatible packages for every API
use Dub\Dub;use Illuminate\Contracts\View\View;use Illuminate\Http\Request;final readonly class LinksController{public function __construct(private Dub $dub,) {}public function index(Request $request): View{return view('links.index', ['links' => $this->dub->links->list(),]);}}
Building on our recent type-safe PHP generation release, we’re excited to introduce Laravel integration support. Now, when you generate PHP SDKs with Speakeasy, you can opt to create a Laravel-compatible package.
What’s included:
- Automatic Service Provider Creation: We’ll generate the necessary service provider for your package.
- Configuration File Setup: Get config files tailored for the Laravel ecosystem.
- Laravel Package Structure: Your SDK will be structured as a proper Laravel package, ready for distribution.
It’s never been easier to make your API native to the Laravel ecosystem!
What in Zod’s name?
Zod (opens in a new tab) powers runtime validation in our TypeScript generation. Depending on the complexity of a Zod schema, the resulting validation error message can contain a wall of JSON text - the serialised issues that were recorded during validation.
We’ve created a small tool to help better visualize and parse the errors. It’s built as a web UI which provides yo with sharable URLs for easy collaboration.
We hope it will help the TypeScript community be able to more easily build with Zod!
Try it out at zod.fyi (opens in a new tab)!
🐝 New features and bug fixes 🐛
NOTE
Based on the most recent CLI version: Speakeasy v1.398.0 (opens in a new tab)
Generation platform
🐝 Feat: improvements to the error handling readme section
🐝 Feat: support path, header, and query parameter assertions in mock server
🐝 Feat: improved snapshot, and performance testing
🐛 Fix: address missing examples and improve number examples
Python
🐛 Fix: patched implementation of optional responses
🐛 Fix: enable const support for Python 3.9.x environments
TypeScript
🐛 Fix: pagination now works when parameter flattening is enabled
PHP
🐝 Feat: Laravel integration support
🐝 Feat: improved PHP usage snippet generation