Schwager takes many influences from OpenAPI and if you don't get the joke in the name: Schwager means "brother in law" and it sounds a lot like Swagger (former OpenAPI's name).
# 16th competing standard
This xkcd never gets old when it comes to talk about standards.
It took me about a week to rip-off OpenAPI design and improve it to my please. My focus was to provide a system enabling to easy expose the API, supporting PSR-15 and with considerable less maintenance needs.
My standard exists because it was way cheaper for me to spawn this project than be bound to OpenAPI's from now.
# API specification
The Schwager API specification is unsurprisingly familiar to OpenAPI on:
- Responses mapped by status code
- Parameter schemas
But Schwager differs on several key elements. At first, it is white-label as you can define
api property freely enabling you to set the pace for each project by defining its own API standard.
Schwager doesn't merge parameters like OpenAPI. Path variables are mapped at path level while body and query parameters have its own respective namespace.
Finally, Schwager enables to define more than one response schema per status code.