EBISPOT/gwas-curation-service

Publication Notes - API endpoint to add Administrative Note to a given Publication:

Closed this issue · 1 comments

Description:
As developer
I want an api endpoint
So that when I send a post request with a Note Payload, I can add administrative notes to a Publication without uploading a curation template.

Management Rules:
Rule 1: Endpoint - /v1/publications/{publicationId}/notes
Rule 2: HTTP Request Method - POST
Rule 3: Proper Assembler, disassemblers and DTO with validation rules
Rule 4: The Endpoint should accept valid Note DTO Object
Rule 5: Standard custom exception be thrown if operation fails
Rule 6: The service must assign the logged in curator as the note creator
Rule 7: Payload containing created note for the publication must be returned
Rule 8: One publication can have multiple note

Acceptance Tests:
Given a JSON payload containing text note
When the front end sends a post request with the payload to the endpoint

If no validation error occurs, the note should be saved, payload with noteId, createdBy, and createDate should be returned

If publicationId not found in the database, error Report must be returned with details = Publication not found”.