{"action":"created","issue":{"url":"https://api.github.com/repos/serverless/serverless/issues/368","labels_url":"https://api.github.com/repos/serverless/serverless/issues/368/labels{/name}","comments_url":"https://api.github.com/repos/serverless/serverless/issues/368/comments","events_url":"https://api.github.com/repos/serverless/serverless/issues/368/events","html_url":"https://github.com/serverless/serverless/pull/368","id":121835664,"number":368,"title":"Streamline plugin creation","user":{"login":"marklawlor","id":3946701,"avatar_url":"https://avatars.githubusercontent.com/u/3946701?v=3","gravatar_id":"","url":"https://api.github.com/users/marklawlor","html_url":"https://github.com/marklawlor","followers_url":"https://api.github.com/users/marklawlor/followers","following_url":"https://api.github.com/users/marklawlor/following{/other_user}","gists_url":"https://api.github.com/users/marklawlor/gists{/gist_id}","starred_url":"https://api.github.com/users/marklawlor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/marklawlor/subscriptions","organizations_url":"https://api.github.com/users/marklawlor/orgs","repos_url":"https://api.github.com/users/marklawlor/repos","events_url":"https://api.github.com/users/marklawlor/events{/privacy}","received_events_url":"https://api.github.com/users/marklawlor/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":13,"created_at":"2015-12-12T05:50:34Z","updated_at":"2015-12-13T02:01:26Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/serverless/serverless/pulls/368","html_url":"https://github.com/serverless/serverless/pull/368","diff_url":"https://github.com/serverless/serverless/pull/368.diff","patch_url":"https://github.com/serverless/serverless/pull/368.patch"},"body":"99% of the time, custom plugins will require either the SPlugin and/or SUtils classes. By not providing these classes, we create unnecessary boilerplate for developers.\r\n\r\nThis is a breaking change for existing plugins, but I feel that the order of arguments is important as this pull request will put them in order of how commonly they are used."},"comment":{"url":"https://api.github.com/repos/serverless/serverless/issues/comments/164210552","html_url":"https://github.com/serverless/serverless/pull/368#issuecomment-164210552","issue_url":"https://api.github.com/repos/serverless/serverless/issues/368","id":164210552,"user":{"login":"ac360","id":2752551,"avatar_url":"https://avatars.githubusercontent.com/u/2752551?v=3","gravatar_id":"","url":"https://api.github.com/users/ac360","html_url":"https://github.com/ac360","followers_url":"https://api.github.com/users/ac360/followers","following_url":"https://api.github.com/users/ac360/following{/other_user}","gists_url":"https://api.github.com/users/ac360/gists{/gist_id}","starred_url":"https://api.github.com/users/ac360/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ac360/subscriptions","organizations_url":"https://api.github.com/users/ac360/orgs","repos_url":"https://api.github.com/users/ac360/repos","events_url":"https://api.github.com/users/ac360/events{/privacy}","received_events_url":"https://api.github.com/users/ac360/received_events","type":"User","site_admin":false},"created_at":"2015-12-13T02:01:26Z","updated_at":"2015-12-13T02:01:26Z","body":"@marklawlor I know there is not a lot of documentation on Plugins yet (sorry!), but are you completely familiar with how the Plugin system works now, specifically how the **event** object and **hooks** work?  \r\n\r\nThe **event** object passes data from Action to Action.  And Plugins can add **hooks** (they don't have to add/override Actions) that fire before of after each Action.\r\n\r\nEverything is already there to write your *Lammbda Prefix* example in a few lines of code.  I'd simply create a Plugin that added a \"Pre\" Hook on the CodeDeployLambdaNodeJs Action.  All Actions and Hooks must accept and return the Event object.  And \"function\" is a property of the Event object in CodeDeployLambdaNodeJs.  Just do `evt.function.name = \"prefix-\" + evt.function.name`  in your plugin.  Done!\r\n\r\nFor your Swagger scenario, what's wrong with writing a simple \"EndpointDeploy\" Pre hook that maps the swagger template data to the endpoint format in `s-function.json?  I think that's the best way to go since it allows any other Plugins to work that may also use the endpoint data in `s-function.json`.\r\n\r\n"}}