Skip to content
This repository has been archived by the owner on Jun 14, 2018. It is now read-only.

Consider auto-generating golang structs for envoy configuration from JSON schema #185

Closed
ayj opened this issue Feb 22, 2017 · 3 comments
Closed

Comments

@ayj
Copy link
Contributor

ayj commented Feb 22, 2017

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 using one of the tools list here. 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.

@rshriram
Copy link
Member

We could always collate all the config into one big JSON schema and generate go struct

@kyessenov
Copy link
Contributor

Sounds like a good idea. When we started, we didn't have swagger schema. We'll loose the extra fields in the structs that are convenient for AST manipulation though.

@kyessenov kyessenov added this to the manager beta milestone Mar 14, 2017
@ayj
Copy link
Contributor Author

ayj commented May 19, 2017

Switching to Envoy v2 API will address this issue.

@ayj ayj closed this as completed May 19, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants