Skip to content
This repository has been archived by the owner on Jan 8, 2024. It is now read-only.

core/api: Add grpc-gateway api #4379

Merged
merged 9 commits into from
Feb 8, 2023
Merged

core/api: Add grpc-gateway api #4379

merged 9 commits into from
Feb 8, 2023

Conversation

demophoon
Copy link
Contributor

@demophoon demophoon commented Jan 9, 2023

This PR enables gRPC-Gateway on the http port of Waypoint server to add in an HTTP API for interfacing with Waypoint.

Most of this PR is autogenerated from the existing server.swagger.json file that is directly generated from our protos.

internal/server/http.go Outdated Show resolved Hide resolved
We need to use the same dial options when setting up GRPC-Gateway for
GRPC-Gateway to properly proxy requests through
This commit enables an HTTP API on the http port of Waypoint. This
utilizes grpc-gateway to pass through http request to grpc calls and
then routes the grpc responses back to the http client using json as the
transport.
This commit removes the basepath from all routes defined within the
grpc-gateway.yml file for it to be configurable by an api client. This
is also added to the swagger.json file so the by default anyone
consuming the swagger spec will have the correct definitions for their
implementation of server
@demophoon demophoon marked this pull request as ready for review February 7, 2023 23:39
Copy link
Contributor

@evanphx evanphx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Innocently small once you remove the generated files!

@demophoon demophoon requested review from a team, catsby and briancain February 8, 2023 01:15
@demophoon demophoon changed the title feat: Add grpc-gateway api core/api: Add grpc-gateway api Feb 8, 2023
.changelog/4379.txt Outdated Show resolved Hide resolved
Co-authored-by: Brian Cain <bcain@hashicorp.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants