Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generate Go Clients From Server Implementations #186

Open
marwan-at-work opened this issue Feb 8, 2019 · 1 comment
Open

Generate Go Clients From Server Implementations #186

marwan-at-work opened this issue Feb 8, 2019 · 1 comment

Comments

@marwan-at-work
Copy link
Contributor

marwan-at-work commented Feb 8, 2019

Any server implementation should have a code generator that creates an idiomatic client for it where the end user has only two exported APIs:

type Service interface { ... } // contains all API calls. 
func NewService(client *http.Client, url string) Service
@jprobinson
Copy link
Contributor

I'm a bit more inclined to go the document-driven approach. Create a API spec and then create servers and clients based on the contract.

Also, if we do build a tool that enables this, I think we may want it in it's own repo and have the generation tied to a specific version. Thoughts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants