What Swagger Misses
OpenAPI is a good interchange format. Every tool reads it, and Papi imports it and exports it. But a format is not a workflow, and most of the pain around an API spec happens between two versions of it.
The spec is too heavy to write first
Here is an order, as OpenAPI wants it:
And here it is in Papi:
When declaring an object takes a dozen lines, people write the code first and generate the spec from it. The spec then describes what was built, and nobody agreed to it.
The grammar, in full
That is all of it. A hint shapes the example the mock answers with, and nothing else: it never makes a change breaking.
A change has no review
A Swagger file changes by commit, usually in the same pull request as the code that implements it. In Papi a change to the spec is a candidate: proposed, discussed, approved, merged. The people who call the API get a say before anything is built.
The diff reads text, not schemas
Move email above name and a text diff reports a change. Reindent a block
and it reports fifty. Papi compares the schemas themselves, side by side, so a
reordered object is no change at all, and a change that breaks a client is
marked as one.
Nowhere to talk about it
Comments in Papi anchor to an endpoint, a response, or a single line of a schema, and they survive the next version. The discussion stays next to the thing it is about.
A spec that cannot run
Every version, and every open candidate, is a mock server. A request gets an example built from the declared response. The frontend can call the API on the day it was proposed.