IPA-115: Envelope Object
Some clients might not be able to access the HTTP response headers and/or status code. In that case, clients can request that the response include an "envelope," which is simply an extra layer of information in the JSON document and contains any relevant details that would normally be in the response headers.
State
Adopt
Guidance
- Resources may support a boolean
envelopequery parameter envelopemust default to false- If
envelopeis set totruefor individual resources- The response must include the field
statusas the HTTP status code - The response must include the field
contentas the requested resource
- The response must include the field
- If
envelopeis set totruefor Paginated resources the existing response must include the fieldstatusas the HTTP status code
Generated API Clients
- Generated clients must not support envelope
- Conditionally changing the shape of a response is not supported by code generation tools