Read what a route promises to return, from the resource that will shape it.
This is the half of a contract that usually has to be written twice: once as the projection the
code performs, once as the response the document claims. A resource publishes its schema, the
runtime validates against it, and this reads the same declaration — so the document cannot say one
thing while the endpoint answers another.
Fragments come with it. A resource exposing summary is exposing a second documented shape, not a
private convenience, so the contract names it too.
Read what a route promises to return, from the resource that will shape it.
This is the half of a contract that usually has to be written twice: once as the projection the code performs, once as the response the document claims. A resource publishes its schema, the runtime validates against it, and this reads the same declaration — so the document cannot say one thing while the endpoint answers another.
Fragments come with it. A resource exposing
summaryis exposing a second documented shape, not a private convenience, so the contract names it too.