{"action":"created","issue":{"url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/32","repository_url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation","labels_url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/32/labels{/name}","comments_url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/32/comments","events_url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/32/events","html_url":"https://github.com/GALAglobal/TAPICC-API-implementation/issues/32","id":345857011,"node_id":"MDU6SXNzdWUzNDU4NTcwMTE=","number":32,"title":"Asset References - proposal","user":{"login":"Alino","id":763194,"node_id":"MDQ6VXNlcjc2MzE5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/763194?v=4","gravatar_id":"","url":"https://api.github.com/users/Alino","html_url":"https://github.com/Alino","followers_url":"https://api.github.com/users/Alino/followers","following_url":"https://api.github.com/users/Alino/following{/other_user}","gists_url":"https://api.github.com/users/Alino/gists{/gist_id}","starred_url":"https://api.github.com/users/Alino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alino/subscriptions","organizations_url":"https://api.github.com/users/Alino/orgs","repos_url":"https://api.github.com/users/Alino/repos","events_url":"https://api.github.com/users/Alino/events{/privacy}","received_events_url":"https://api.github.com/users/Alino/received_events","type":"User","site_admin":false},"labels":[{"id":981448650,"node_id":"MDU6TGFiZWw5ODE0NDg2NTA=","url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":1002268700,"node_id":"MDU6TGFiZWwxMDAyMjY4NzAw","url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/labels/needs%20discussion","name":"needs discussion","color":"e5dd40","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-07-30T17:30:55Z","updated_at":"2018-08-03T10:14:35Z","closed_at":null,"author_association":"MEMBER","body":"I propose to create new data model called ```Reference```\r\n\r\n```javascript\r\n{\r\n  id: {\r\n    type: 'integer'\r\n  },\r\n  assetId: {\r\n    model: 'asset'\r\n  },\r\n  description: {\r\n    type: 'string',\r\n    example: 'Translation Memory'\r\n  },\r\n  file: {\r\n     type: 'binary'\r\n  }\r\n}\r\n```\r\n\r\nendpoints:\r\n```POST /asset/{parentId}/reference/uploadfile```\r\n```GET, PUT, DELETE /reference/{id}```\r\n\r\n----\r\n\r\nexample - seeing an Asset and being able to view it's References:\r\n\r\n```GET /job/1/asset/5```\r\n\r\nresponse:\r\n\r\n```javascript\r\n{\r\n  id: 5,\r\n  sourceLanguage: 'en'\r\n  jobId: 1,\r\n  tasks: [{ id: 14, targetLanguage: 'sk', type: 'translation' }],\r\n  references: [\r\n    { id: 23, assetId: 5, description: 'Translation Memory' },\r\n    { id: 24, assetId: 5, description: 'Termbase' }\r\n  ]\r\n}\r\n```\r\n\r\n----\r\n\r\nNote:\r\n- this would mean that _Asset.isReference_ will be removed.\r\n- this would be good separation of concerns between Assets and References\r\n- this would link References with Assets, so that you can also download all files related to an Asset\r\n\r\nQuestions:\r\n1. Do we want many to many relationship between Assets and References? Therefore one Reference could be used in multiple Assets."},"comment":{"url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/comments/410210442","html_url":"https://github.com/GALAglobal/TAPICC-API-implementation/issues/32#issuecomment-410210442","issue_url":"https://api.github.com/repos/GALAglobal/TAPICC-API-implementation/issues/32","id":410210442,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMDIxMDQ0Mg==","user":{"login":"Alino","id":763194,"node_id":"MDQ6VXNlcjc2MzE5NA==","avatar_url":"https://avatars3.githubusercontent.com/u/763194?v=4","gravatar_id":"","url":"https://api.github.com/users/Alino","html_url":"https://github.com/Alino","followers_url":"https://api.github.com/users/Alino/followers","following_url":"https://api.github.com/users/Alino/following{/other_user}","gists_url":"https://api.github.com/users/Alino/gists{/gist_id}","starred_url":"https://api.github.com/users/Alino/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Alino/subscriptions","organizations_url":"https://api.github.com/users/Alino/orgs","repos_url":"https://api.github.com/users/Alino/repos","events_url":"https://api.github.com/users/Alino/events{/privacy}","received_events_url":"https://api.github.com/users/Alino/received_events","type":"User","site_admin":false},"created_at":"2018-08-03T10:14:35Z","updated_at":"2018-08-03T10:14:35Z","author_association":"MEMBER","body":"If we implement this References proposal, then Asset.type won't make much sense to me.\r\n\r\nAsset.file = the source file of the Asset (an Asset is always an Asset)\r\nReference.file = the reference file (the Reference is always a Reference)\r\nTask.file = the deliverable (Task is always Task)\r\n\r\n----\r\n\r\nI agree with Asset.description addition."}}
{"actor":{"display_login":"Alino"}}