From 3505e85434e332e715b30e0d8a1c34743f5f7dca Mon Sep 17 00:00:00 2001 From: Ludovic Robert <30499179+bigludo7@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:54:47 +0200 Subject: [PATCH 1/2] Update OTPvalidationAPI.feature Remove 405 test scenarios --- .../Test_Definitions/OTPvalidationAPI.feature | 31 ++----------------- 1 file changed, 2 insertions(+), 29 deletions(-) diff --git a/code/Test_Definitions/OTPvalidationAPI.feature b/code/Test_Definitions/OTPvalidationAPI.feature index 60d6d22..fc00c51 100644 --- a/code/Test_Definitions/OTPvalidationAPI.feature +++ b/code/Test_Definitions/OTPvalidationAPI.feature @@ -118,7 +118,7 @@ Scenario: Validation for sucess validate-code scenario without x-correlator And the response header "x-correlator" has same value as the request header "x-correlator" # Following part describe scenario to test error code defined in the yaml -# These scenarios cover following http status: 400, 401, 404, 405, 406, 415 +# These scenarios cover following http status: 400, 401, 404, 406, 415 # Following error code is not managed in scenarios # -429 as it could not be easily tested @@ -251,21 +251,7 @@ Scenario: Validation for sucess validate-code scenario without x-correlator And the response property "$.code" is "NOT_FOUND" And the response property "$.message" contains a user friendly text And the response header "x-correlator" has same value as the request header "x-correlator" - -########################### -# 405 errors for send_code -########################### - @OTPvalidationAPI_405.1_send_code_method_not_allowed - Scenario: method not allowed - # As API Gateway can prevent this test by restricting path/routes this test should be considered as optional - Given the request body property "$.phoneNumber" is set to config_var: "phone_number" - And the request body property "$.message" is set to config_var: "message" - And the resource "/one-time-password-sms/v0/send-code" - When the HTTP "GET" request is sent - Then the response property "$.status" is 405 - And the response header "x-correlator" has same value as the request header "x-correlator" - And the response property "$.message" contains a user friendly text ########################### # 406 errors for send_code @@ -363,7 +349,7 @@ Scenario: Validations for verification failed validate-code scenario whe maximu And the response header "x-correlator" has same value as the request header "x-correlator" # Following part describe scenario to test error code defined in the yaml -# These scenarios cover following http status: 400, 401, 404, 405, 406, 415 +# These scenarios cover following http status: 400, 401, 404, 406, 415 # Following error code is not managed in scenarios # -429 as it could not be easily tested @@ -483,19 +469,6 @@ Scenario: Validations for verification failed validate-code scenario whe maximu And the response header "x-correlator" has same value as the request header "x-correlator" And the response property "$.message" contains a user friendly text -############################### -# 405 errors for validate_code -############################### - - @OTPvalidationAPI_405_validate_code_method_not_allowed - Scenario: method not allowed - # As API Gateway can prevent this test by restricting path/routes this test should be considered as optional - Given an authenticationId has been retrieved from a send-code request - And the request body property "$.code" is set to the value received in the SMS - And the resource "/one-time-password-sms/v0/validate-code" - When the HTTP "GET" request is sent - Then the response property "$.status" is 405 - And the response header "x-correlator" has same value as the request header "x-correlator" ############################### # 406 errors for validate_code From 5a8c9c921098f8c6bb41fee317e8b971aa4c72ca Mon Sep 17 00:00:00 2001 From: Ludovic Robert <30499179+bigludo7@users.noreply.github.com> Date: Tue, 20 Aug 2024 14:56:42 +0200 Subject: [PATCH 2/2] Update one-time-password-sms.yaml remove 405 error code --- .../one-time-password-sms.yaml | 21 +------------------ 1 file changed, 1 insertion(+), 20 deletions(-) diff --git a/code/API_definitions/one-time-password-sms.yaml b/code/API_definitions/one-time-password-sms.yaml index 541618f..fec221e 100644 --- a/code/API_definitions/one-time-password-sms.yaml +++ b/code/API_definitions/one-time-password-sms.yaml @@ -21,7 +21,7 @@ info: It is important to remark that in cases where personal user data is processed by the API, and users can exercise their rights through mechanisms such as opt-in and/or opt-out, the use of 3-legged access tokens becomes mandatory. This measure ensures that the API remains in strict compliance with user privacy preferences and regulatory obligations, upholding the principles of transparency and user-centric data control. - version: 1.0.0-rc.1 + version: wip x-camara-commonalities: 0.4.0 license: name: Apache 2.0 @@ -77,8 +77,6 @@ paths: $ref: '#/components/responses/SendCodeForbiddenError403' '404': $ref: '#/components/responses/Generic404' - '405': - $ref: '#/components/responses/Generic405' '406': $ref: '#/components/responses/Generic406' '415': @@ -131,8 +129,6 @@ paths: $ref: '#/components/responses/Generic403' '404': $ref: '#/components/responses/Generic404' - '405': - $ref: '#/components/responses/Generic405' '406': $ref: '#/components/responses/Generic406' '415': @@ -356,21 +352,6 @@ components: status: 404 code: NOT_FOUND message: A specified resource is not found - Generic405: - description: The requested method is not allowed/supported on the target resource - headers: - x-correlator: - description: Correlation id for the different services - schema: - type: string - content: - application/json: - schema: - $ref: '#/components/schemas/ErrorInfo' - example: - status: 405 - code: METHOD_NOT_ALLOWED - message: The requested method is not allowed/supported on the target resource Generic406: description: The server can not produce a response matching the content headers: