Jan 14, 2026
Generate an OpenAPI repository

Young-jin Park
Software Engineer
You can now configure targets.openapi to automatically generate and maintain a Git repository containing your OpenAPI specification.
What's new:
Automated repository generation at
stainless-sdks/<project>-openapi(or your ownproduction_repo)Multiple spec variants generated automatically based on your configuration:
Base specification (
openapi.json/yml)Transformed specs when using Stainless Transforms
Specs with code samples for documentation integration
Runs on every Stainless build - no manual CI/CD configuration needed
Customizable output via
targets.openapi.options.files
Why this matters: Teams previously had to manually set up pipelines to push generated OpenAPI specs to public repositories. This target automates that workflow, making it easier to maintain public API specifications, communicate changes through commit history, and provide stable URLs for documentation tools.
Getting started:
See the OpenAPI target documentation for full configuration options.