{"action":"created","issue":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3746","repository_url":"https://api.github.com/repos/swagger-api/swagger-codegen","labels_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3746/labels{/name}","comments_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3746/comments","events_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3746/events","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3746","id":175552846,"number":3746,"title":"[JS] Setting license","user":{"login":"delenius","id":7936653,"avatar_url":"https://avatars.githubusercontent.com/u/7936653?v=3","gravatar_id":"","url":"https://api.github.com/users/delenius","html_url":"https://github.com/delenius","followers_url":"https://api.github.com/users/delenius/followers","following_url":"https://api.github.com/users/delenius/following{/other_user}","gists_url":"https://api.github.com/users/delenius/gists{/gist_id}","starred_url":"https://api.github.com/users/delenius/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/delenius/subscriptions","organizations_url":"https://api.github.com/users/delenius/orgs","repos_url":"https://api.github.com/users/delenius/repos","events_url":"https://api.github.com/users/delenius/events{/privacy}","received_events_url":"https://api.github.com/users/delenius/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-07T16:48:40Z","updated_at":"2016-09-08T10:40:30Z","closed_at":null,"body":"##### Description\r\n\r\nThe JavaScript code generator always puts \r\n\r\n```javascript\r\n\"license\": \"Apache-2.0\",\r\n```\r\n\r\nin the generated package.json file. \r\nIt should be possible to set this using the `projectLicenseName` property.\r\nAlso, according to the help screen, the default should be `info.license.name`. I don't know what that means, but it's not being used by the JS generator (or any others, it seems).\r\n\r\n##### Swagger-codegen version\r\n\r\nLatest from master, commit 47e75cb\r\n\r\n##### Suggest a Fix\r\n\r\nIn `..../Javascript/package.mustache`, change the line above to\r\n\r\n```javascript\r\n  \"license\": \"{{{projectLicenseName}}}\",\r\n```\r\n\r\nHowever, this will produce an empty string unless the user sets this optional property manually. If we want to default to Apache-2.0 as is currently done, we should change it to\r\n\r\n```javascript\r\n  \"license\": \"{{#projectLicenseName}}{{{projectLicenseName}}}{{/projectLicenseName}}{{^projectLicenseName}}Apache-2.0{{/projectLicenseName}}\",\r\n```\r\n\r\nI will submit a PR to that effect."},"comment":{"url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/comments/245559787","html_url":"https://github.com/swagger-api/swagger-codegen/issues/3746#issuecomment-245559787","issue_url":"https://api.github.com/repos/swagger-api/swagger-codegen/issues/3746","id":245559787,"user":{"login":"wing328","id":934260,"avatar_url":"https://avatars.githubusercontent.com/u/934260?v=3","gravatar_id":"","url":"https://api.github.com/users/wing328","html_url":"https://github.com/wing328","followers_url":"https://api.github.com/users/wing328/followers","following_url":"https://api.github.com/users/wing328/following{/other_user}","gists_url":"https://api.github.com/users/wing328/gists{/gist_id}","starred_url":"https://api.github.com/users/wing328/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wing328/subscriptions","organizations_url":"https://api.github.com/users/wing328/orgs","repos_url":"https://api.github.com/users/wing328/repos","events_url":"https://api.github.com/users/wing328/events{/privacy}","received_events_url":"https://api.github.com/users/wing328/received_events","type":"User","site_admin":false},"created_at":"2016-09-08T10:40:30Z","updated_at":"2016-09-08T10:40:30Z","body":"@delenius please refer to https://github.com/swagger-api/swagger-codegen/issues/2963 for the latest discussion on the license of the auto-generated code."}}
{"actor":{"display_login":"wing328"}}