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

REST API support #28

Closed
mumoshu opened this issue Feb 28, 2018 · 3 comments
Closed

REST API support #28

mumoshu opened this issue Feb 28, 2018 · 3 comments

Comments

@mumoshu
Copy link
Contributor

mumoshu commented Feb 28, 2018

It would be nice include a library or a stub of a REST API server in kube-toolkit generated project, so that we could build a nifty Web UI which relies on the REST API.
Imagine something like Brigade + Kashti :)

For reference, it would be nice to have a stub implementation of a REST API server like Brigade's.
I'm not yet sure which part of the stub could be extracted into a library of kube-toolkit(Nothing?).

@radu-matei
Copy link
Owner

radu-matei commented Feb 28, 2018

Have you seen this?

gif

There actually is a dashboard in /gateway/web, using gRPC-gateway - essentially, add this to your gRCP method definition:

	rpc GetVersion(google.protobuf.Empty) returns (Version){
		option (google.api.http) = {
            get: "/api/version"
          };
	}

And when building you automatically get a Swagger definition, together with a TypeScript client ready to use in the Angular dashboard app.

Does this answer your question?

(There should be a very clear doc explaining how to extend and add a web component, but that's another story...)

@mumoshu
Copy link
Contributor Author

mumoshu commented Feb 28, 2018

@radu-matei Awesome! It seems to be exactly what I was looking for. Great job 👍

@mumoshu
Copy link
Contributor Author

mumoshu commented Feb 28, 2018

Thanks for the answer. Closing this as resolved, opened a dedicated issue #30 to track documentation improvements.

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