GALAglobal / TAPICC-API-implementation

TAPICC API implementation using node.js framework sails.js
Other
6 stars 1 forks source link

Associating a Task to an Asset should be optional #47

Closed Alino closed 6 years ago

Alino commented 6 years ago

Currently each Task has to be associated with one Asset by assetId property. There is no way to create an individual Task (not associated with an Asset) with an API endpoint. I thought it is not a problem, but as I was reviewing the Task types document, I found out there are few Task types which are not supposed to be necessarily tied to an Asset.

For example: Content creation

[from Copywriting] Creating new highly literary, marketing or special demand audience source or target content according to the client specification and target audience expectations. [from Technical writing] Creating source or target language technical specifications to equipment, software, hardware or other product for the technical audience, without special literary requirements or expectations, where fluency may be average, but accuracy is more important.


Therefore I suggest to change the following Task related API endpoints

from

GET, POST /assets/{assetId}/tasks
GET, PUT, DELETE /assets/{assetId}/tasks/{taskId}
POST /assets/{assetId}/tasks/{taskId}/uploaddeliverable
GET /assets/{assetId}/tasks/{taskId}/downloaddeliverable

to

GET, POST /tasks
GET, PUT, DELETE /tasks/{taskId}
POST /tasks/{taskId}/uploaddeliverable
GET /tasks/{taskId}/downloaddeliverable

also

Alino commented 6 years ago

This was agreed on today on our GALA meeting

Swagger definition updated https://github.com/GALAglobal/TAPICC-API-implementation/commit/de7e3010c3ff2bc977210e09428f05218d003990 Implementation updated https://github.com/GALAglobal/TAPICC-API-implementation/commit/467088890fa438352853eea15c03fd51b2bc8077

ysavourel commented 6 years ago

It looks like the Swagger definition still shows the assetId path parameter to create a new task:

image

Alino commented 6 years ago

Thanks for reporting that, fixed https://github.com/GALAglobal/TAPICC-API-implementation/commit/bce8a4e85b6358dd74ba86d958413f93ee0169f6