Skip to content

Commit aa09d3b

Browse files
committed
NPA-4823 Construct PATCH /Consent 4XX Table
1 parent f722c72 commit aa09d3b

File tree

1 file changed

+25
-27
lines changed

1 file changed

+25
-27
lines changed

specification/validated-relationships-service-api.yaml

Lines changed: 25 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -227,7 +227,7 @@ paths:
227227
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
228228
| 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. |
229229
| 408 | `TIMEOUT` | Request timed out. |
230-
| 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. |
230+
| 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. |
231231
| 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
232232
233233
content:
@@ -788,8 +788,30 @@ paths:
788788
patchConsentSuccess:
789789
$ref: "./examples/responses/PATCH_Consent/success.yaml#/PatchConsentSuccess"
790790

791-
"400":
792-
description: Invalid patch
791+
"4XX":
792+
description: |
793+
Errors will be returned for the first error encountered in the request. For details, see the `diagnostics` field of error. An error occurred as follows:
794+
795+
| HTTP status | Error code | Description |
796+
| ----------- | --------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------- |
797+
| 400 | `BAD_REQUEST` | Bad request. |
798+
| 400 | `INVALID_VALUE` | Invalid Parameter or Invalid operation. |
799+
| 400 | `INVALID_PATCH_FORMAT` | Invalid patch format. |
800+
| 400 | `INVALID_PATCH` | Invalid patch. |
801+
| 401 | `ACCESS_DENIED` | Missing or invalid OAuth 2.0 bearer token in request. |
802+
| 403 | `FORBIDDEN` | Access denied to resource. |
803+
| 404 | `INVALIDATED_RESOURCE` | Resource that has been marked as invalid was requested - invalid resources cannot be retrieved |
804+
| 405 | `METHOD_NOT_ALLOWED` | The method is not allowed. |
805+
| 408 | `TIMEOUT` | Request timed out. |
806+
| 415 | `UNSUPPORTED_MEDIA` | Unsupported media type. |
807+
| 422 | `INVALID_PATCH_PATH` | Invalid patch path. |
808+
| 422 | `INVALID_STATUS_CODE` | Invalid status code. |
809+
| 422 | `INVALID_STATE_TRANSITION` | Invalid state transition. |
810+
| 422 | `INVALID_LEGAL_BASIS_CODE` | Invalid legal basis code. |
811+
| 422 | `INVALID_END_DATE` | End date is invalid. |
812+
| 422 | `DUPLICATE_PATCHES` | Two or more patches use same path. |
813+
| 429 | `THROTTLED` | You have exceeded your application's [rate limit](https://digital.nhs.uk/developer/guides-and-documentation/reference-guide#rate-limits). |
814+
793815
content:
794816
application/fhir+json:
795817
schema:
@@ -799,30 +821,6 @@ paths:
799821
$ref: "./examples/responses/PATCH_Consent/errors/invalid_patch_format.yaml#/PatchConsentInvalidPatchFormatError"
800822
patchConsentInvalidPathError:
801823
$ref: "./examples/responses/PATCH_Consent/errors/invalid_path.yaml#/PatchConsentInvalidPathError"
802-
803-
"404":
804-
description: Resource not found
805-
content:
806-
application/fhir+json:
807-
schema:
808-
$ref: "#/components/schemas/OperationOutcome"
809-
examples:
810-
patchConsentRelationshipNotFoundError:
811-
$ref: "./examples/responses/PATCH_Consent/errors/resource_not_found.yaml#/PatchConsentRelationshipNotFoundError"
812-
813-
"415":
814-
description: Unsupported media type
815-
content:
816-
application/fhir+json:
817-
schema:
818-
$ref: "#/components/schemas/OperationOutcome"
819-
"422":
820-
description: Business rule validation failed
821-
content:
822-
application/fhir+json:
823-
schema:
824-
$ref: "#/components/schemas/OperationOutcome"
825-
examples:
826824
patchConsentInvalidStatusCodeError:
827825
$ref: "./examples/responses/PATCH_Consent/errors/invalid_status_code.yaml#/PatchConsentInvalidStatusCodeError"
828826
patchConsentInvalidStateTransitionError:

0 commit comments

Comments
 (0)