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)
committerMatt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Thu, 12 Oct 2023 16:00:22 +0000 (16:00 +0000)
commit6acfa90cc7e8d14049fd882554b1d9fe2a729141
tree04a4cc10c54b02f2088abca1d1429bd5fc29f82f
parent295497b557bf9440023ed99e676a963a4e68401b
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>
(cherry picked from commit 3dc9bf900bd666eb17272060e071422a35267ada)
Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
(cherry picked from commit 745a6bde5e58bda0ba4eb619dcf2253ab63da5df)
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
api/v1/swagger/definitions/suggestion.yaml