{"action":"created","issue":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/5852","repository_url":"https://api.github.com/repos/wso2/carbon-apimgt","labels_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/5852/labels{/name}","comments_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/5852/comments","events_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/5852/events","html_url":"https://github.com/wso2/carbon-apimgt/pull/5852","id":377996723,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI4ODA2MjE2","number":5852,"title":"Fix https://github.com/wso2/product-apim/issues/3911","user":{"login":"dushaniw","id":12208083,"node_id":"MDQ6VXNlcjEyMjA4MDgz","avatar_url":"https://avatars3.githubusercontent.com/u/12208083?v=4","gravatar_id":"","url":"https://api.github.com/users/dushaniw","html_url":"https://github.com/dushaniw","followers_url":"https://api.github.com/users/dushaniw/followers","following_url":"https://api.github.com/users/dushaniw/following{/other_user}","gists_url":"https://api.github.com/users/dushaniw/gists{/gist_id}","starred_url":"https://api.github.com/users/dushaniw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dushaniw/subscriptions","organizations_url":"https://api.github.com/users/dushaniw/orgs","repos_url":"https://api.github.com/users/dushaniw/repos","events_url":"https://api.github.com/users/dushaniw/events{/privacy}","received_events_url":"https://api.github.com/users/dushaniw/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-11-06T19:22:02Z","updated_at":"2018-11-15T05:01:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/pulls/5852","html_url":"https://github.com/wso2/carbon-apimgt/pull/5852","diff_url":"https://github.com/wso2/carbon-apimgt/pull/5852.diff","patch_url":"https://github.com/wso2/carbon-apimgt/pull/5852.patch"},"body":"## Purpose\r\nFix issue in https://github.com/wso2/product-apim/issues/3911\r\n\r\n## Goals\r\nvalidate admin rest api tier deletion and validate x-throttling tiers given in api creation, update and swagger update from both Jaggery and REST apis.\r\n\r\n## Approach\r\n1.Validate x-throttle tier\r\nGet all tiers from the AM_API_THROTTLE_POLICY table when advanced throttling enabled or from res-tiers.xml in registry when advanced throttling disabled. Then validate the resource tiers given in URI templates of api definition against that policy name list. Validate create api, update api, update swagger REST, Jaggery api methods and from UI.\r\n2.Validate tier deletion apis using the same validate method in carbon.apimgt.impl which is used in Admin UI.\r\n\r\n## User stories\r\nWhen both scenarios where advanced throttling enabled or not ,\r\nAdd api with resource tiers.\r\nUpdate api with resource tiers.\r\nUpdate api swagger with resource tiers.\r\nImport swagger, edit swagger from publisher UI.\r\nDelete subscription tier which already has an active subscription.\r\nDelete advanced tier which already as has an attachment\r\nDelete application tier which already has an attachment.\r\n\r\n\r\n## Release note\r\nBug Fix\r\n\r\n## Documentation\r\nN/A\r\n\r\n## Training\r\nN/A\r\n\r\n## Certification\r\nN/A\r\n\r\n## Marketing\r\nN/A\r\n\r\n## Automation tests\r\n - Unit tests \r\n      provided\r\n - Integration tests\r\n \r\n\r\n## Security checks\r\n - Followed secure coding standards in http://wso2.com/technical-reports/wso2-secure-engineering-guidelines? yes\r\n - Ran FindSecurityBugs plugin and verified report? yes/no\r\n - Confirmed that this PR doesn't commit any keys, passwords, tokens, usernames, or other secrets? yes\r\n\r\n## Samples\r\nN/A\r\n\r\n## Related PRs\r\nN/A\r\n\r\n## Migrations (if applicable)\r\nN/A\r\n\r\n\r\n## Learning\r\nN/A"},"comment":{"url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/comments/438918363","html_url":"https://github.com/wso2/carbon-apimgt/pull/5852#issuecomment-438918363","issue_url":"https://api.github.com/repos/wso2/carbon-apimgt/issues/5852","id":438918363,"node_id":"MDEyOklzc3VlQ29tbWVudDQzODkxODM2Mw==","user":{"login":"dushaniw","id":12208083,"node_id":"MDQ6VXNlcjEyMjA4MDgz","avatar_url":"https://avatars3.githubusercontent.com/u/12208083?v=4","gravatar_id":"","url":"https://api.github.com/users/dushaniw","html_url":"https://github.com/dushaniw","followers_url":"https://api.github.com/users/dushaniw/followers","following_url":"https://api.github.com/users/dushaniw/following{/other_user}","gists_url":"https://api.github.com/users/dushaniw/gists{/gist_id}","starred_url":"https://api.github.com/users/dushaniw/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dushaniw/subscriptions","organizations_url":"https://api.github.com/users/dushaniw/orgs","repos_url":"https://api.github.com/users/dushaniw/repos","events_url":"https://api.github.com/users/dushaniw/events{/privacy}","received_events_url":"https://api.github.com/users/dushaniw/received_events","type":"User","site_admin":false},"created_at":"2018-11-15T05:01:40Z","updated_at":"2018-11-15T05:01:40Z","author_association":"CONTRIBUTOR","body":"#NoDocImpact "}}
{"actor":{"display_login":"dushaniw"}}