RFC063: Remove JSON wrapper in API request and response
Background and rationale
This RFC was raised during the discussion about RFC061.
The iSHARE Trust Framework includes API specifications for iSHARE defined API endpoints, such as the /parties endpoint or the /delegation endpoint. The API requests and responses are designed as signed JWT (JWS) payloads. The payload of the JWT itself is a JSON structure containing the actual content. The JWT itself is wrapped in a JSON payload. For instance:
Response from the /parties endpoint is:
{"parties_token":"<JWT>"}
The element contains the actual party information as a JSON object in the body.
Proposed change: purpose
The proposed change is to remove the JSON wrapper around the JWT for all requests and responses. The JWT itself would then become the body of the request or response of the /parties endpoint.
Proposed change: considerations and requirements
Things to consider
- This is expected to make implementation easier. But is it?
- How will backwards compatibility (not) work?
- Does this work well with OpenAPI specifications?