Skip to content

Commit

Permalink
Audit fix in the data service.
Browse files Browse the repository at this point in the history
I can't explain why, but before preparing this commit I couldn't npm install in the data-service _at all_ due to conflicting peer deps.
I resolved that in this change, but then found that there were a lot of failing tests in the data service. I don't know when they were
introduced so I can't account for them, but it seems that OpenAPI validation has changed from "no schema === any response" to "no
schema === empty response". For those responses where the presence of a body was causing a test failure, I have introduced a permissive
"any JSON response" schema.
  • Loading branch information
iamleeg committed Jun 16, 2022
1 parent 568fd7b commit 5af5c9e
Show file tree
Hide file tree
Showing 3 changed files with 223 additions and 1,534 deletions.
20 changes: 20 additions & 0 deletions data-serving/data-service/api/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,8 @@ paths:
$ref: '#/components/responses/400'
'403':
$ref: '#/components/responses/403'
'404':
$ref: '#/components/responses/404'
'422':
$ref: '#/components/responses/422'
'500':
Expand Down Expand Up @@ -257,6 +259,10 @@ paths:
responses:
'200':
$ref: '#/components/responses/200CasesDownload'
'400':
$ref: '#/components/responses/400'
'422':
$ref: '#/components/responses/422'
'500':
$ref: '#/components/responses/500'
/cases/batchUpsert:
Expand Down Expand Up @@ -1039,6 +1045,8 @@ components:
$ref: '#/components/schemas/Date'
sideEffects:
$ref: '#/components/schemas/SymptomArray'
AnyValue:
description: Used for errors and exceptional cases that need human inspection and intervention
responses:
'200Case':
description: OK
Expand Down Expand Up @@ -1122,12 +1130,24 @@ components:
description: No content
'400':
description: Malformed request
content:
application/json:
schema:
$ref: '#/components/schemas/AnyValue'
'403':
description: Forbidden
'404':
description: Not found
content:
application/json:
schema:
$ref: '#/components/schemas/AnyValue'
'422':
description: Unprocessable entity
content:
application/json:
schema:
$ref: '#/components/schemas/AnyValue'
'500':
description: Internal server error
servers:
Expand Down
Loading

0 comments on commit 5af5c9e

Please sign in to comment.