Revise Descriptions When OSCAL Content Returned to Client
Closed this issue · 2 comments
brian-comply0 commented
Description
As a developer issuing OSCAL REST API calls to retrieve OSCAL content, I need to understand how to request the OSCAL format I require.
Acceptance Criteria
- For each model, the description for the following endpoints is updated as defined below
-
GET /[model-name]/{Identifier}
-
GET /[model-name]/{Identifier}/snapshot/{Identifier}
-
GET /profile/{Identifier}/resolved-catalog
-
GET /profile/{Identifier}/resolved-snapshot/{Identifier}
-
Description Content
The current description should be maintained for each of the four endpoints, with the following added to that content:
When processing this request, the implementation _must_ honor the `Accept` HTTP header for JSON, XML, and YAML. When `Accept` is set to:
- `application/json` or `application/oscal+json` return the OSCAL content in JSON format;
- `application/xml` (preferred by RFC 7303) or `text/xml` (deprecated by RFC 7303) or `application/oscal+xml` return the OSCAL content in XML format; or
- `application/yaml` or `text/yaml` return the OSCAL content in YAML format.
When returning the OSCAL content, the implementation _must_ set the `Content-type` header to:
- `application/json` when returning the OSCAL content in JSON format;
- `application/xml` when returning the OSCAL content in XML format; or
- `application/yaml` when return the OSCAL content in YAML format.
brian-comply0 commented
@mpemy changes look good!
brian-comply0 commented
Full addressed in PR #72. Closing.