From f6afc218cfb7379d7b84870a345dd1d6479dd37e Mon Sep 17 00:00:00 2001 From: Eric Murray Date: Tue, 22 Sep 2026 12:22:35 +0100 Subject: [PATCH] Update error response schema using new Commonalities r4.4 schema --- code/API_definitions/device-identifier.yaml | 160 +++----------------- 1 file changed, 24 insertions(+), 136 deletions(-) diff --git a/code/API_definitions/device-identifier.yaml b/code/API_definitions/device-identifier.yaml index 6d510e0..53ebd48 100644 --- a/code/API_definitions/device-identifier.yaml +++ b/code/API_definitions/device-identifier.yaml @@ -229,17 +229,17 @@ paths: "200": $ref: '#/components/responses/200RetrieveIdentifier' "400": - $ref: '#/components/responses/400BadRequest' + $ref: '../common/CAMARA_common.yaml#/components/responses/BadRequestWithRange400' "401": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic401' + $ref: '../common/CAMARA_common.yaml#/components/responses/Unauthenticated401' "403": - $ref: '#/components/responses/403Forbidden' + $ref: '../common/CAMARA_common.yaml#/components/responses/PermissionDenied403' "404": - $ref: '#/components/responses/404NotFound' + $ref: '../common/CAMARA_common.yaml#/components/responses/IdentifierNotFound404' "422": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic422' + $ref: '../common/CAMARA_common.yaml#/components/responses/DeviceIdentifier422' "429": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic429' + $ref: '../common/CAMARA_common.yaml#/components/responses/TooManyRequests429' "/retrieve-type": post: @@ -275,17 +275,17 @@ paths: "200": $ref: '#/components/responses/200RetrieveType' "400": - $ref: '#/components/responses/400BadRequest' + $ref: '../common/CAMARA_common.yaml#/components/responses/BadRequestWithRange400' "401": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic401' + $ref: '../common/CAMARA_common.yaml#/components/responses/Unauthenticated401' "403": - $ref: '#/components/responses/403Forbidden' + $ref: '../common/CAMARA_common.yaml#/components/responses/PermissionDenied403' "404": - $ref: '#/components/responses/404NotFound' + $ref: '../common/CAMARA_common.yaml#/components/responses/IdentifierNotFound404' "422": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic422' + $ref: '../common/CAMARA_common.yaml#/components/responses/DeviceIdentifier422' "429": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic429' + $ref: '../common/CAMARA_common.yaml#/components/responses/TooManyRequests429' "/retrieve-ppid": post: @@ -321,17 +321,17 @@ paths: "200": $ref: '#/components/responses/200RetrievePPID' "400": - $ref: '#/components/responses/400BadRequest' + $ref: '../common/CAMARA_common.yaml#/components/responses/BadRequestWithRange400' "401": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic401' + $ref: '../common/CAMARA_common.yaml#/components/responses/Unauthenticated401' "403": - $ref: '#/components/responses/403Forbidden' + $ref: '../common/CAMARA_common.yaml#/components/responses/PermissionDenied403' "404": - $ref: '#/components/responses/404NotFound' + $ref: '../common/CAMARA_common.yaml#/components/responses/IdentifierNotFound404' "422": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic422' + $ref: '../common/CAMARA_common.yaml#/components/responses/DeviceIdentifier422' "429": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic429' + $ref: '../common/CAMARA_common.yaml#/components/responses/TooManyRequests429' "/match-identifier": post: @@ -367,17 +367,17 @@ paths: "200": $ref: '#/components/responses/200MatchIdentifier' "400": - $ref: '#/components/responses/400BadRequest' + $ref: '../common/CAMARA_common.yaml#/components/responses/BadRequestWithRange400' "401": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic401' + $ref: '../common/CAMARA_common.yaml#/components/responses/Unauthenticated401' "403": - $ref: '#/components/responses/403Forbidden' + $ref: '../common/CAMARA_common.yaml#/components/responses/PermissionDenied403' "404": - $ref: '#/components/responses/404NotFound' + $ref: '../common/CAMARA_common.yaml#/components/responses/IdentifierNotFound404' "422": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic422' + $ref: '../common/CAMARA_common.yaml#/components/responses/DeviceIdentifier422' "429": - $ref: '../common/CAMARA_common.yaml#/components/responses/Generic429' + $ref: '../common/CAMARA_common.yaml#/components/responses/TooManyRequests429' components: securitySchemes: @@ -523,118 +523,6 @@ components: lastChecked: "2024-02-20T10:41:38.657Z" match: true - 400BadRequest: - description: | - Invalid request syntax or malformed JSON. - This status is reserved for: - - Malformed JSON in the request body - - Invalid data types - - Invalid format (not matching required patterns) - Business validation errors should return 422 instead. - headers: - x-correlator: - $ref: "../common/CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 400 - code: - enum: - - INVALID_ARGUMENT - - OUT_OF_RANGE - examples: - Insufficient Parameters: - description: Sufficient parameters must be provided to allow the target UE to be identified - value: - status: 400 - code: INVALID_ARGUMENT - message: "At least one of phoneNumber, networkAccessIdentifier, ipv4Address and ipv6Address must be specified" - Invalid Network Access Identifier: - value: - status: 400 - code: INVALID_ARGUMENT - message: "Invalid format: networkAccessIdentifier" - Invalid Phone Number: - value: - status: 400 - code: INVALID_ARGUMENT - message: "Invalid format: phoneNumber" - Invalid IPv4 Address: - value: - status: 400 - code: INVALID_ARGUMENT - message: "Invalid format: ipv4Address" - Invalid IPv6 Address: - value: - status: 400 - code: INVALID_ARGUMENT - message: "Invalid format: ipv6Address" - Invalid Port Value: - value: - status: 400 - code: OUT_OF_RANGE - message: "Invalid value: ipv4Address.publicPort" - - 403Forbidden: - description: Forbidden - headers: - x-correlator: - $ref: "../common/CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 403 - code: - enum: - - PERMISSION_DENIED - examples: - Permission Denied: - description: Permission denied. OAuth2 token access does not have the required scope or when the user fails operational security - value: - status: 403 - code: PERMISSION_DENIED - message: Client does not have sufficient permissions to perform this action. - - 404NotFound: - description: | - Subscription cannot be resolved from the provided device identifiers or access token. - The network cannot map the request to a known subscription. - headers: - x-correlator: - $ref: "../common/CAMARA_common.yaml#/components/headers/x-correlator" - content: - application/json: - schema: - allOf: - - $ref: "../common/CAMARA_common.yaml#/components/schemas/ErrorInfo" - - type: object - properties: - status: - enum: - - 404 - code: - enum: - - IDENTIFIER_NOT_FOUND - examples: - Mobile Device Identifier Not Found: - description: The provided identifier cannot be matched to a device known to the API provider - value: - status: 404 - code: IDENTIFIER_NOT_FOUND - message: The provided identifier cannot be matched to a device. - schemas: Imei: description: Schema for the International Mobile Equipment Identity (IMEI) of a physical mobile device