@ValidModel crashing the socks [UPDATE] rout.

#1 · open · 0 comments

View on GitHub ↗

TiagoGIM

Currently, the stock update route allows the update of all fields but is crashing if nothing are passing, It is necessary to add a model validation to ensure that the body is correct Steps: Add a field validation to the stock update route Test the stock update route to ensure that only allowed fields are updated witouth crash the app. Acceptance criteria: The stock update route should only allow the update of allowed fields The stock update route should return an error if any non-allowed field is updated or if ti is missing field. Note1: The stock update route already exists, so a detailed inspection must be carried out to identify which fields are updateable and which are not. After identification, the validation must be added to the route code. Note2: The [@ValidModel](https://github.com/TiagoGIM/flaskdockerapi/blob/main/helpers/validators.py)( Model.class) decorator is already implemented but it only works on the POST route. Please investigate this issue.

Comments