Bug 32942: Suggestion API route when non 'standard' status are present
authorFrédéric Demians <f.demians@tamil.fr>
Fri, 10 Feb 2023 17:23:11 +0000 (18:23 +0100)
committerTomas Cohen Arazi <tomascohen@theke.io>
Mon, 18 Sep 2023 18:31:43 +0000 (15:31 -0300)
commit3dc9bf900bd666eb17272060e071422a35267ada
tree0d9195213e7c3598225d12b0d04fe1b2dfc51249
parente13f68965efab9b5f25daf1ec9926386fd386800
Bug 32942: Suggestion API route when non 'standard' status are present

The API route for listing all suggestion:

/api/v1/suggestions

send back an error message when there is a suugestion with non standard
status (ASKED, CHECKED, ACCEPTED, REJECTED).

This patch fixes this too restrictive restriction.

TO TEST:

1. Add a status in SUGGEST_STATUS AV list.
2. Create a suggestion, and assign it to the previsous status.
3. Call /api/v1/suggestion
3. You get an error message:
   {
    "errors": [ {
      "message":"Not in enum list: ASKED, CHECKED, ACCEPTED, REJECTED.",
      "path":"\/1\/status"
    }],
    "status":200
   }
4. Apply the patch. Call /api/v1/suggestion

Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
api/v1/swagger/definitions/suggestion.yaml