openapi.json. One edit moves both, so the document cannot drift from the
server.
Where to get the document
All four hold the same document. The two files in the repository are written by the same command.
Regenerate after a route change
Generate a client
Any generator that reads OpenAPI 3.1 produces a typed client from this document. Point the generator at the live URL, or at a committed copy. Named response models exist because the generator hoists reused schemas intocomponents/schemas. You get MeResponse, StudentProfile, ChatMessage, and the three SSE
event models as real classes.
What the document cannot express
Server-Sent Events. OpenAPI describes the200 response of POST /api/chat/send as a string of
content type text/event-stream. The event names and their payloads are not in the machine-readable
part of the document.
The payload models are registered as components, so a generated client still gets the classes:
ChatChunkEventChatDoneEventChatErrorEvent
Versioning
The document reports version1.0.0. There is no version prefix in the paths, and there is no
version header. A breaking change to the wire contract will be announced before it ships.