{"action":"opened","issue":{"url":"https://api.github.com/repos/flyvictor/fortune/issues/122","labels_url":"https://api.github.com/repos/flyvictor/fortune/issues/122/labels{/name}","comments_url":"https://api.github.com/repos/flyvictor/fortune/issues/122/comments","events_url":"https://api.github.com/repos/flyvictor/fortune/issues/122/events","html_url":"https://github.com/flyvictor/fortune/issues/122","id":60101879,"number":122,"title":"Allow RPC fortune actions to be self describing","user":{"login":"craigedmunds","id":1453591,"avatar_url":"https://avatars.githubusercontent.com/u/1453591?v=3","gravatar_id":"","url":"https://api.github.com/users/craigedmunds","html_url":"https://github.com/craigedmunds","followers_url":"https://api.github.com/users/craigedmunds/followers","following_url":"https://api.github.com/users/craigedmunds/following{/other_user}","gists_url":"https://api.github.com/users/craigedmunds/gists{/gist_id}","starred_url":"https://api.github.com/users/craigedmunds/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigedmunds/subscriptions","organizations_url":"https://api.github.com/users/craigedmunds/orgs","repos_url":"https://api.github.com/users/craigedmunds/repos","events_url":"https://api.github.com/users/craigedmunds/events{/privacy}","received_events_url":"https://api.github.com/users/craigedmunds/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-03-06T13:31:55Z","updated_at":"2015-03-06T13:31:55Z","closed_at":null,"body":"Fortune actions allow us to restrict the scope of a resource by filtering /users/admin-users, or to allow RPC style methods to be added to resources, where a use case doesn't naturally fit into a resourceful interaction, e.g. /users/:id/send-password-reset-email. An example of this feature is [here](https://github.com/flyvictor/fortune/blob/master/examples/custom_actions.js). We also create tools, like fa-grid and fa-uml that consume metadata about the service and make it more accessible to humans.\r\n\r\nWe want the actions to be able to describe themselves, and for this information to be surfaced as part of the metadata so that it can be consumed by client apps. For RPC style actions it should describe the inputs and outputs of the action.\r\n\r\nActions should allow simple input/outputs, specifying the fields, or the input or output could be a resource, either the current resource, or the id of a related resource."}}