Skip to content

Commit

Permalink
generalize response status 400 description (#99 SPECITS-70)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebastian-iancu committed Apr 20, 2024
1 parent af1e4a0 commit 0993156
Show file tree
Hide file tree
Showing 24 changed files with 23 additions and 36 deletions.
2 changes: 1 addition & 1 deletion specifications/operations/composition_create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ responses:
'201':
$ref: ../responses/201_COMPOSITION.yaml
'400':
$ref: ../responses/400_COMPOSITION.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id.yaml
'422':
Expand Down
2 changes: 1 addition & 1 deletion specifications/operations/composition_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ responses:
'200':
$ref: ../responses/200_COMPOSITION_updated.yaml
'400':
$ref: ../responses/400_COMPOSITION.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id_or_uid_based_id.yaml
'412':
Expand Down
2 changes: 1 addition & 1 deletion specifications/operations/definition_query_store.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ responses:
'200':
$ref: ../responses/200_StoredQuery_stored.yaml
'400':
$ref: ../responses/400_StoredQuery.yaml
$ref: ../responses/400.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,6 @@ responses:
'200':
$ref: ../responses/200_StoredQuery_stored.yaml
'400':
$ref: ../responses/400_StoredQuery.yaml
$ref: ../responses/400.yaml
'409':
$ref: ../responses/409_StoredQuery_version.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ responses:
'200':
$ref: ../responses/200_Template_adl1_4_retrieved.yaml
'400':
$ref: ../responses/400_invalid_template_id.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_template_id.yaml
'406':
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,6 @@ responses:
'201':
$ref: ../responses/201_Template_adl1_4_upload.yaml
'400':
$ref: ../responses/400_invalid_template_content.yaml
$ref: ../responses/400.yaml
'409':
$ref: ../responses/409_template_already_exists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@ responses:
'200':
$ref: ../responses/200_Template_adl2_retrieved.yaml
'400':
$ref: ../responses/400_invalid_template_id.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_template_id.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ responses:
'201':
$ref: ../responses/201_Template_adl2_upload.yaml
'400':
$ref: ../responses/400_invalid_template_content.yaml
$ref: ../responses/400.yaml
'409':
$ref: ../responses/409_template_already_exists.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,6 @@ responses:
'200':
$ref: ../responses/200_Template_adl2_retrieved.yaml
'400':
$ref: ../responses/400_invalid_template_id.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_template_id_or_version.yaml
2 changes: 1 addition & 1 deletion specifications/operations/directory_create.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@ responses:
'201':
$ref: ../responses/201_directory.yaml
'400':
$ref: ../responses/400_FOLDER.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id.yaml
2 changes: 1 addition & 1 deletion specifications/operations/directory_delete.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ responses:
'204':
$ref: ../responses/204_because_deleted.yaml
'400':
$ref: ../responses/400_invalid_ehr_id.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id.yaml
'412':
Expand Down
2 changes: 1 addition & 1 deletion specifications/operations/directory_update.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ responses:
'204':
$ref: ../responses/204_directory_updated.yaml
'400':
$ref: ../responses/400_FOLDER.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id.yaml
'412':
Expand Down
2 changes: 1 addition & 1 deletion specifications/operations/ehr_status_get_at_time.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ responses:
'200':
$ref: ../responses/200_EHR_STATUS_retrieved.yaml
'400':
$ref: ../responses/400_invalid_version_at_time.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id_or_no_version_at_time.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@ responses:
'200':
$ref: ../responses/200_VERSION_of_EHR_STATUS_at_time.yaml
'400':
$ref: ../responses/400_invalid_version_at_time.yaml
$ref: ../responses/400.yaml
'404':
$ref: ../responses/404_unknown_ehr_id_or_no_version_at_time.yaml
7 changes: 6 additions & 1 deletion specifications/responses/400.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,7 @@
description: |
`400 Bad Request` is returned when the request URL or body (if provided) could not be parsed or has invalid content.
`400 Bad Request` is returned when the request could not be parsed or is invalid (e.g. malformed request URL syntax, missing required header or parameter, or syntactically invalid header, parameter or content).
The response body MAY contain error details.
content:
application/json:
schema:
$ref: ../schemas/others/Error.yaml
6 changes: 0 additions & 6 deletions specifications/responses/400_COMPOSITION.yaml

This file was deleted.

3 changes: 2 additions & 1 deletion specifications/responses/400_CONTRIBUTION.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
description: |
`400 Bad Request` is returned when the request URL or body could not be parsed or has invalid content (e.g. invalid `ehr_id`, or either the body of the request not be converted to a valid CONTRIBUTION object, or the modification type doesn’t match the operation - i.e. first version of a composition with MODIFICATION).
`400 Bad Request` is returned when the request could not be parsed or is invalid (e.g. malformed request URL syntax, missing required header or parameter, or syntactically invalid header, parameter or content, or the modification type does not match the operation - i.e. first version of a MODIFICATION).
The response body MAY contain error details.
content:
application/json:
schema:
Expand Down
2 changes: 0 additions & 2 deletions specifications/responses/400_FOLDER.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions specifications/responses/400_StoredQuery.yaml

This file was deleted.

2 changes: 1 addition & 1 deletion specifications/responses/400_already_deleted.yaml
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
description: |
`400 Bad Request` is returned when the request URL could not be parsed (i.e. invalid format of request parameters) or when the resource identified by the request parameters is already deleted.
`400 Bad Request` is returned when the request could not be parsed or is invalid (e.g. malformed request URL syntax, missing required header or parameter, or syntactically invalid header, parameter or content) or when the resource identified by the request parameters is already deleted.
2 changes: 0 additions & 2 deletions specifications/responses/400_invalid_ehr_id.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions specifications/responses/400_invalid_template_content.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions specifications/responses/400_invalid_template_id.yaml

This file was deleted.

2 changes: 0 additions & 2 deletions specifications/responses/400_invalid_version_at_time.yaml

This file was deleted.

0 comments on commit 0993156

Please sign in to comment.