{"action":"opened","issue":{"url":"https://api.github.com/repos/istio/manager/issues/185","repository_url":"https://api.github.com/repos/istio/manager","labels_url":"https://api.github.com/repos/istio/manager/issues/185/labels{/name}","comments_url":"https://api.github.com/repos/istio/manager/issues/185/comments","events_url":"https://api.github.com/repos/istio/manager/issues/185/events","html_url":"https://github.com/istio/manager/issues/185","id":209352785,"number":185,"title":"Consider auto-generating golang structs for envoy configuration from JSON schema","user":{"login":"ayj","id":116378,"avatar_url":"https://avatars.githubusercontent.com/u/116378?v=3","gravatar_id":"","url":"https://api.github.com/users/ayj","html_url":"https://github.com/ayj","followers_url":"https://api.github.com/users/ayj/followers","following_url":"https://api.github.com/users/ayj/following{/other_user}","gists_url":"https://api.github.com/users/ayj/gists{/gist_id}","starred_url":"https://api.github.com/users/ayj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ayj/subscriptions","organizations_url":"https://api.github.com/users/ayj/orgs","repos_url":"https://api.github.com/users/ayj/repos","events_url":"https://api.github.com/users/ayj/events{/privacy}","received_events_url":"https://api.github.com/users/ayj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-02-22T04:56:48Z","updated_at":"2017-02-22T04:56:48Z","closed_at":null,"body":"Hand generating and maintaining envoy configuration structs (i.e. proxy/envoy/resources.go) is a bit cumbersome. We could possibly auto-generate golang-based structs with JSON annotations from envoy's [JSON schema definitions](https://github.com/lyft/envoy/blob/master/source/common/json/config_schemas.cc) using one of the tools list [here](https://adrianhesketh.com/2016/07/19/json-schema-to-go-struct-generator-roundup/). Envoy's configuration is defined as multiple separate JSON schema so we'd still end up writing some additional generation code even with an existing JSON-schema-to-golang library. This approach may end up being more trouble than it's worth, but it might be worth considering."}}
{"actor":{"display_login":"ayj"}}