Skip to content

Commit

Permalink
Add 500 schema and endpoints (#141)
Browse files Browse the repository at this point in the history
* Add 500 schema and endpoints to data node paths

* Add 500 reponse to all remaining paths of all services
  • Loading branch information
tschaffter authored Jan 21, 2021
1 parent de13036 commit e330f4a
Show file tree
Hide file tree
Showing 19 changed files with 84 additions and 20 deletions.
5 changes: 5 additions & 0 deletions openapi/commons/components/responses/InternalServerError.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
description: The request cannot be fulfilled due to an unexpected server error
content:
application/json:
schema:
$ref: ../schemas/Error.yaml
4 changes: 3 additions & 1 deletion openapi/commons/paths/healthCheck.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ get:
schema:
$ref: ../components/schemas/HealthCheck.yaml
'404':
$ref: ../components/responses/NotFound.yaml
$ref: ../components/responses/NotFound.yaml
'500':
$ref: ../components/responses/InternalServerError.yaml
4 changes: 3 additions & 1 deletion openapi/commons/paths/service.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,6 @@ get:
schema:
$ref: ../components/schemas/Service.yaml
'404':
$ref: ../components/responses/NotFound.yaml
$ref: ../components/responses/NotFound.yaml
'500':
$ref: ../components/responses/InternalServerError.yaml
6 changes: 5 additions & 1 deletion openapi/data-node/paths/annotationStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- AnnotationStore
Expand Down Expand Up @@ -61,4 +63,6 @@ get:
$ref: ../components/schemas/PageOfAnnotationStores.yaml
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml
$ref: ../../commons/components/responses/BadRequest.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ get:
$ref: ../components/schemas/AnnotationStore.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- AnnotationStore
Expand All @@ -40,4 +42,6 @@ delete:
schema:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
6 changes: 5 additions & 1 deletion openapi/data-node/paths/annotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- Annotation
Expand Down Expand Up @@ -60,4 +62,6 @@ get:
$ref: ../components/schemas/PageOfAnnotations.yaml
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml
$ref: ../../commons/components/responses/BadRequest.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
6 changes: 5 additions & 1 deletion openapi/data-node/paths/annotations@{annotationId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ get:
$ref: ../../commons/components/schemas/Annotation.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- Annotation
Expand All @@ -46,4 +48,6 @@ delete:
schema:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
5 changes: 4 additions & 1 deletion openapi/data-node/paths/datasets.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- Dataset
Expand Down Expand Up @@ -55,4 +57,5 @@ get:
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml

'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
6 changes: 5 additions & 1 deletion openapi/data-node/paths/datasets@{datasetId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ get:
$ref: ../components/schemas/Dataset.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- Dataset
Expand All @@ -34,4 +36,6 @@ delete:
schema:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/fhirStores.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- FhirStore
Expand Down Expand Up @@ -62,3 +64,5 @@ get:
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
6 changes: 5 additions & 1 deletion openapi/data-node/paths/fhirStores@{fhirStoreId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ get:
$ref: ../components/schemas/FhirStore.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- FhirStore
Expand All @@ -40,4 +42,6 @@ delete:
schema:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/notes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- Note
Expand Down Expand Up @@ -61,3 +63,5 @@ get:
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/notes@{noteId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ get:
$ref: ../../commons/components/schemas/Note.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- Note
Expand All @@ -47,3 +49,5 @@ delete:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/patients.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,8 @@ post:
$ref: ../../commons/components/responses/BadRequest.yaml
'409':
$ref: ../../commons/components/responses/Conflict.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
get:
tags:
- Patient
Expand Down Expand Up @@ -61,3 +63,5 @@ get:
description: Success
'400':
$ref: ../../commons/components/responses/BadRequest.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 4 additions & 0 deletions openapi/data-node/paths/patients@{patientId}.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ get:
$ref: ../../commons/components/schemas/Patient.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
delete:
tags:
- Patient
Expand All @@ -47,3 +49,5 @@ delete:
$ref: ../../commons/components/schemas/EmptyObject.yaml
'404':
$ref: ../../commons/components/responses/NotFound.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
4 changes: 3 additions & 1 deletion openapi/date-annotator/paths/textDateAnnotations.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ post:
schema:
$ref: ../components/schemas/TextDateAnnotations.yaml
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
$ref: ../../commons/components/responses/Unauthorized.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ post:
schema:
$ref: ../components/schemas/TextPersonNameAnnotations.yaml
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
$ref: ../../commons/components/responses/Unauthorized.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
18 changes: 10 additions & 8 deletions openapi/phi-deidentifier/paths/deidentifiedNotes.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,13 @@ post:
schema:
$ref: ../components/schemas/DeidentifyRequest.yaml
responses:
'200':
description: Success
content:
application/json:
schema:
$ref: ../components/responses/DeidentifyResponse.yaml
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
'200':
description: Success
content:
application/json:
schema:
$ref: ../components/responses/DeidentifyResponse.yaml
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,6 @@ post:
schema:
$ref: ../components/schemas/TextPhysicalAddressAnnotations.yaml
'403':
$ref: ../../commons/components/responses/Unauthorized.yaml
$ref: ../../commons/components/responses/Unauthorized.yaml
'500':
$ref: ../../commons/components/responses/InternalServerError.yaml

0 comments on commit e330f4a

Please sign in to comment.