Skip to main content
Define response shapes once, then use them both when rendering and when describing the endpoint. A shape prevents storage fields from becoming API fields by accident.

Define the public object

The getter for internal_note is not used when the active caller cannot see that attribute.

Render and describe the same shape

taskEnvelope.Body delays projection until HTTPAPI knows the response caller and any property selection attached to the request. ResponseBody gives the runtime and transcribers the same shape metadata.

Let clients select fields safely

Compatible JSON endpoints accept standard response projection metadata:
Each top-level envelope field is a projection resource. Within one resource, a client may use pick or omit, not both. The endpoint validates the resource names, property paths, and caller visibility against its successful JSON response contracts before invoking application code. Use response.Project when a domain object first needs a small response-facing view. Use response.Envelope for stable top-level resources and ExactlyOneOf for mutually exclusive response alternatives.
Response projection controls emitted fields. It does not authorize access to the endpoint or the underlying resource.