At this moment in Web API in all endpoints (except for find) we return the corresponding result from CLI.Types. But it seems not correct, because these results contain both success and errors. And API should return only success results (error results return in corresponding handlers. See #99).
Endpoints that create resources should return Entry. For e.g. /create endpoint should return Entry instead of CreateResult.
Endpoints that modify resources should return that modified resource. For e.g. /set-field endpoint should return Entry and /copy endpoint should return Directory.
Acceptance criteria
All Web API endpoints return Entry or Directory results.
Blocked by #83.
Clarification and motivation
At this moment in Web API in all endpoints (except for
find
) we return the corresponding result fromCLI.Types
. But it seems not correct, because these results contain both success and errors. And API should return only success results (error results return in corresponding handlers. See #99).Endpoints that create resources should return
Entry
. For e.g./create
endpoint should returnEntry
instead ofCreateResult
.Endpoints that modify resources should return that modified resource. For e.g.
/set-field
endpoint should returnEntry
and/copy
endpoint should returnDirectory
.Acceptance criteria
All Web API endpoints return
Entry
orDirectory
results.