OlhenShu / ProjectStage_Team2_May

0 stars 0 forks source link

[Category, POST /category] The 200 (OK) response code is documented in the list of response codes instead of 201 (Created) #253

Open OlhenShu opened 2 months ago

OlhenShu commented 2 months ago

Environment: Windows 11 Home Chrome 114.0.5735.91 (Official buid) (64-bit) GreenCityDocker-3 is built and running.

Reproducible: always.

Pre-conditions: User is logged in as Admin

Steps to reproduce

  1. Select the “Category Controller” section.
  2. Select the method POST/category.
  3. Add the request body with the JSON data (e.g { "name": "string2", "nameUa": "string2", "parentCategoryId": 0} )
  4. Send the request.
  5. Compare the returned response code with the list of documented response codes.

Actual result: Response 200 (OK) is documented in the list of the response codes for the method POST /category of the Category Controller section

Expected result: Response 201 (Created) is documented in the list of the response codes for the method POST /category of the Category Controller section

User story and test case links