Overview
What openapi-proxy does, and the three things it is made of.
Your backend generates one OpenAPI document for everything it does. openapi-proxy fetches that document, keeps the parts each audience should see, and serves each selection at a URL of its own. When your API changes, the served documents change with it.
Three things
- A workspace is the people who share the projects. Signing in gives you one, and you invite colleagues into it.
- A project is one API as its readers know it: one OpenAPI document fetched from a URL, or several merged into one. A document can be public, or behind credentials that the proxy sends for you.
- A variant is a selection of that document's operations, served at
/v/<project>/<variant>. Your public docs read one, your SDK generator another. A variant is public, or private and read with an API key.
A variant keeps the operations you chose and exactly what they reference: schemas, parameters, responses, security schemes. Nothing else from the source ends up in it. It is served as JSON and YAML, in OpenAPI 3.0 and 3.1, and the URL says which.
Where to go next
- Connecting a document: what the proxy reads, and how it reads a document that is not public.
- Selecting operations: what a variant serves, today and when your API grows.
- Serving a variant: the URLs, formats and response headers your consumers see, and private variants.
- Merging documents: one project from the documents of several services.
- Environments and servers: production, sandbox and staging, and audiences that should see different servers.
- OpenAPI versions: every variant as 3.0 and 3.1, picked by the URL.
- When your API changes: what is served then, and how you hear about it.
- Keeping in sync: how the proxy notices that your API changed, and how often it looks.
- Sending an ETag and A version endpoint: two ways to make a check nearly free, so that the proxy looks every 5 minutes instead of once an hour.
- API and MCP: doing all of it from a script or an agent.
- Self-hosting: running it on your own Cloudflare account.