{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/generator-loopback/issues/128","labels_url":"https://api.github.com/repos/strongloop/generator-loopback/issues/128/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/generator-loopback/issues/128/comments","events_url":"https://api.github.com/repos/strongloop/generator-loopback/issues/128/events","html_url":"https://github.com/strongloop/generator-loopback/issues/128","id":121741994,"number":128,"title":"Update generators and tests to use shared method","user":{"login":"jannyHou","id":12554153,"avatar_url":"https://avatars.githubusercontent.com/u/12554153?v=3","gravatar_id":"","url":"https://api.github.com/users/jannyHou","html_url":"https://github.com/jannyHou","followers_url":"https://api.github.com/users/jannyHou/followers","following_url":"https://api.github.com/users/jannyHou/following{/other_user}","gists_url":"https://api.github.com/users/jannyHou/gists{/gist_id}","starred_url":"https://api.github.com/users/jannyHou/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jannyHou/subscriptions","organizations_url":"https://api.github.com/users/jannyHou/orgs","repos_url":"https://api.github.com/users/jannyHou/repos","events_url":"https://api.github.com/users/jannyHou/events{/privacy}","received_events_url":"https://api.github.com/users/jannyHou/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-12-11T16:26:27Z","updated_at":"2015-12-11T16:26:27Z","closed_at":null,"body":"I am opening this issue for updating generator `index.js` files and tests to use shared method.\r\n\r\nI extracted function `readJsonSync` to `/test/common.js`:\r\nhttps://github.com/strongloop/generator-loopback/blob/master/test/common.js#L67\r\nrelated files to be changed:\r\nhttps://github.com/strongloop/generator-loopback/search?utf8=%E2%9C%93&q=readJsonSync\r\n\r\nAnd function `getTypeChoices` to `/lib/helpers.js`:\r\nhttps://github.com/strongloop/generator-loopback/blob/master/lib/helpers.js#L139\r\nrelated files to be changed:\r\nhttps://github.com/strongloop/generator-loopback/blob/master/relation/index.js\r\nhttps://github.com/strongloop/generator-loopback/blob/master/property/index.js\r\n(The list might increase after a more detailed review of the whole repo)"}}