diff --git a/code/API_definitions/sim-swap.yaml b/code/API_definitions/sim-swap.yaml index 1201692..ea1a889 100644 --- a/code/API_definitions/sim-swap.yaml +++ b/code/API_definitions/sim-swap.yaml @@ -288,6 +288,7 @@ components: code: enum: - INVALID_ARGUMENT + - OUT_OF_RANGE examples: GENERIC_400_INVALID_ARGUMENT: description: Invalid Argument. Generic Syntax Exception @@ -295,6 +296,12 @@ components: status: 400 code: INVALID_ARGUMENT message: Client specified an invalid argument, request body or query param. + GENERIC_400_OUT_OF_RANGE: + description: Out of Range. Specific Syntax Exception used when a given field has a pre-defined range or a invalid filter criteria combination is requested + value: + status: 400 + code: OUT_OF_RANGE + message: Client specified an invalid range. Generic401: description: Unauthorized headers: diff --git a/code/Test_definitions/sim-swap-check.feature b/code/Test_definitions/sim-swap-check.feature index d5f776a..8d4a8e2 100644 --- a/code/Test_definitions/sim-swap-check.feature +++ b/code/Test_definitions/sim-swap-check.feature @@ -188,3 +188,12 @@ Feature: CAMARA SIM Swap API, 2.0.0-rc.1 - Operation checkSimSwap And the response property "$.status" is 400 And the response property "$.code" is "INVALID_ARGUMENT" And the response property "$.message" contains a user friendly text + + @check_sim_swap_400.3_invalid_max_age_value + Scenario: Check that the response shows an error when the max age is above the limit + Given the request body property "$.maxAge" is set to 100000 + When the request "checkSimSwap" is sent + Then the response status code is 400 + And the response property "$.status" is 400 + And the response property "$.code" is "OUT_OF_RANGE" + And the response property "$.message" contains a user friendly text