StreetCode icon indicating copy to clipboard operation
StreetCode copied to clipboard

[API][Chronology block] It is possible to make a create/update request of chronology card without mandatory keys in the request

Open iskoryk opened this issue 1 year ago • 1 comments
trafficstars

Environment: all Reproducible: always Build found: a7d807f

Preconditions

  1. Open Postman.
  2. Choose the PUT/POST method.
  3. Enter valid endpoints.

Steps to reproduce

  1. Fill in all mandatory keys for creating/updating a Streetcode.
  2. In the TimelineItems block, fill only the "id" and "title" data keys, in "historicalContexts" too. Delete all other keys. For instance:
Details

"timelineItems": [ { "id": 0, "title": "Сімейне тепло", "historicalContexts": [ { "id": 19, "title": "Радянська Україна" } ] },

  1. Click the button Send.

Actual result The response returns a '200 OK' status. The new chronology card is created.

Expected result The response returns a '400 Bad Request' status with the message "Add and fill in all mandatory keys in "timelineItems" block".

User story: #124 Related bugs: #1325, #1337 Screenshot 2024-04-12 at 12 44 53

iskoryk avatar Apr 12 '24 09:04 iskoryk