EBISPOT / gwas-curation-service

0 stars 0 forks source link

Backend API endpoint to partially Update of one or more specified attribute of an efo trait #71

Open sprintell opened 3 years ago

sprintell commented 3 years ago

API endpoint to partially Update of one or more specified attribute of an efo trait

Description: As developer I want an api endpoint So that I can update few attributes of an efo trait

Management Rules: Rule 0: Endpoint must be accessible to curator role only Rule 1: Endpoint - /v1/efo-traits/{efoTraitIds} Rule 2: HTTP Request Method - PATCH Rule 3: Endpoint should accept one efo trait id Rule 4: The Endpoint should accept validated EfoTrait DTO Object Rule 5: Endpoint should return updated version of the efo trait

Acceptance Tests: Given a wrong efoTrait id When user sends a patch request to the endpoint Properly described Entity not found exception should be returned in JSON format

Given invalid payload When user sends a patch request to the endpoint Properly described Exception should be returned in JSON format, detailing what payload attribute is wrong

Given a correct efoTrait Id with valid payload When the front end sends a patch request to the endpoint The corresponding efo trait must be partially updated
And updated efo trait returned

ljwh2 commented 2 years ago

Would be best practise to have this, not required as part of standard workflow. Not a lot of work to add.