-
Notifications
You must be signed in to change notification settings - Fork 109
Description
User Story
As a User, I want a count_only query parameter on the GET /cve endpoint so that I can receive just the count of records that match my query instead of receiving the records as well.
Acceptance Criteria
Scenario 1 - Happy Path
Given: A user makes a GET request to the RSUS Get CVE Record endpoint
When: includes query parameter 'count_only=true'
Then: RSUS returns a 200: Ok response without the record array (only the totalCount field is populated)
Scenario 2 - invalid value for count_only
Given: A user makes a GET request to the RSUS Get CVE Record endpoint
when: includes a non boolean value for count_only (a valid false gets ignored as it's the default for the endpoint)
Then: RSUS returns a 400: Bad Request with a message describing count_only is a boolean query parameter.
Definition of Done
There is at least one unit test per scenario, proving the expectations of the scenario have been met.
There is at least one endpoint (black box) test per scenario, proving the code fulfills the scenario with the application set up similar to its production state.
The openapi.yml file has been updated to document proper use of the new endpoint.
This includes:
- Describing how different roles can interact with the system when applicable
- Successful response
- Possible error responses
- Additional comments made to properly convey the behavior changed or added if the Open API spec does not provide an appropriate medium to document it