{"action":"created","issue":{"url":"https://api.github.com/repos/yarpc/yab/issues/153","repository_url":"https://api.github.com/repos/yarpc/yab","labels_url":"https://api.github.com/repos/yarpc/yab/issues/153/labels{/name}","comments_url":"https://api.github.com/repos/yarpc/yab/issues/153/comments","events_url":"https://api.github.com/repos/yarpc/yab/issues/153/events","html_url":"https://github.com/yarpc/yab/issues/153","id":207667963,"number":153,"title":"Support arguments to yaml templates","user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars0.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-02-14T23:32:32Z","updated_at":"2017-03-06T21:20:46Z","closed_at":null,"body":"We often have common queries (either for testing, or administration) that have some parameters.\r\n\r\nIt would be nice if we could use a YAML template and parameterize parts of it (e.g., the service name, or some part of the request body).\r\n\r\nE.g., if `--health` didn't exist, we might have a yaml template like:\r\n```\r\n#!/usr/bin/yab -y\r\n\r\nservice: $service\r\nthrift: ./idl/meta.health\r\nprocedure: Meta::health\r\nbody:\r\n  user: ${user:prashant}\r\n```\r\n\r\nAnd we could do `./health.yaml --arg service:foo --arg user:foo`"},"comment":{"url":"https://api.github.com/repos/yarpc/yab/issues/comments/284536291","html_url":"https://github.com/yarpc/yab/issues/153#issuecomment-284536291","issue_url":"https://api.github.com/repos/yarpc/yab/issues/153","id":284536291,"user":{"login":"prashantv","id":140159,"avatar_url":"https://avatars0.githubusercontent.com/u/140159?v=3","gravatar_id":"","url":"https://api.github.com/users/prashantv","html_url":"https://github.com/prashantv","followers_url":"https://api.github.com/users/prashantv/followers","following_url":"https://api.github.com/users/prashantv/following{/other_user}","gists_url":"https://api.github.com/users/prashantv/gists{/gist_id}","starred_url":"https://api.github.com/users/prashantv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/prashantv/subscriptions","organizations_url":"https://api.github.com/users/prashantv/orgs","repos_url":"https://api.github.com/users/prashantv/repos","events_url":"https://api.github.com/users/prashantv/events{/privacy}","received_events_url":"https://api.github.com/users/prashantv/received_events","type":"User","site_admin":false},"created_at":"2017-03-06T21:20:46Z","updated_at":"2017-03-06T21:20:46Z","body":"Not yet! We have a bit of work to do before we can do argument support:\r\n - add parser for the `${user:prashant}` style of syntax. This will be based on the work done by @abhinav for YARPC configuration. The parser will need some changes (allow specifying a literal `$`, possibly quoting for values inside, etc\r\n - add a pre-processor that evaluates a `map[string]interface{}` replacing any arguments\r\n\r\nIt will probably take a couple of weeks but is definitely on our roadmap (especially pre 1.0)"}}
{"actor":{"display_login":"prashantv"}}