-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
web: add generators for typescript defs
- Loading branch information
Showing
9 changed files
with
231 additions
and
58 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,27 @@ | ||
FROM golang:1.12-alpine | ||
RUN apk update | ||
RUN apk add protobuf protobuf-dev git wget make | ||
RUN go get -u github.com/golang/protobuf/protoc-gen-go github.com/golang/protobuf/jsonpb github.com/golang/protobuf/proto github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway google.golang.org/grpc | ||
|
||
RUN apk add \ | ||
protobuf \ | ||
protobuf-dev \ | ||
git \ | ||
wget \ | ||
make \ | ||
nodejs \ | ||
npm | ||
|
||
RUN go get -u \ | ||
github.com/golang/protobuf/protoc-gen-go \ | ||
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway \ | ||
github.com/grpc-ecosystem/grpc-gateway/protoc-gen-swagger \ | ||
google.golang.org/grpc \ | ||
github.com/google/wire/cmd/wire | ||
|
||
RUN go get golang.org/x/tools/cmd/goimports | ||
RUN cd /tmp && wget https://github.com/grpc/grpc-web/releases/download/1.0.6/protoc-gen-grpc-web-1.0.6-linux-x86_64 && mv protoc-gen-grpc-web-1.0.6-linux-x86_64 /usr/local/bin/protoc-gen-grpc-web && chmod +x /usr/local/bin/protoc-gen-grpc-web | ||
RUN go get -u github.com/google/wire/cmd/wire | ||
|
||
RUN cd /tmp && \ | ||
wget https://github.com/grpc/grpc-web/releases/download/1.0.6/protoc-gen-grpc-web-1.0.6-linux-x86_64 && \ | ||
mv protoc-gen-grpc-web-1.0.6-linux-x86_64 /usr/local/bin/protoc-gen-grpc-web && \ | ||
chmod +x /usr/local/bin/protoc-gen-grpc-web | ||
|
||
RUN npm install -g @manifoldco/swagger-to-ts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,106 @@ | ||
{ | ||
"swagger": "2.0", | ||
"info": { | ||
"title": "pkg/webview/view.proto", | ||
"version": "version not set" | ||
}, | ||
"schemes": [ | ||
"http", | ||
"https" | ||
], | ||
"consumes": [ | ||
"application/json" | ||
], | ||
"produces": [ | ||
"application/json" | ||
], | ||
"paths": { | ||
"/api/proto/webview.ViewService/GetView": { | ||
"get": { | ||
"operationId": "GetView", | ||
"responses": { | ||
"200": { | ||
"description": "A successful response.", | ||
"schema": { | ||
"$ref": "#/definitions/webviewView" | ||
} | ||
} | ||
}, | ||
"tags": [ | ||
"ViewService" | ||
] | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"webviewResource": { | ||
"type": "object", | ||
"title": "TODO(dmiller) fill this in" | ||
}, | ||
"webviewTiltBuild": { | ||
"type": "object", | ||
"properties": { | ||
"version": { | ||
"type": "string" | ||
}, | ||
"commitSHA": { | ||
"type": "string" | ||
}, | ||
"date": { | ||
"type": "string" | ||
}, | ||
"dev": { | ||
"type": "boolean", | ||
"format": "boolean" | ||
} | ||
} | ||
}, | ||
"webviewView": { | ||
"type": "object", | ||
"properties": { | ||
"log": { | ||
"type": "string" | ||
}, | ||
"resources": { | ||
"type": "array", | ||
"items": { | ||
"$ref": "#/definitions/webviewResource" | ||
} | ||
}, | ||
"log_timestamps": { | ||
"type": "boolean", | ||
"format": "boolean" | ||
}, | ||
"feature_flags": { | ||
"type": "object", | ||
"additionalProperties": { | ||
"type": "boolean", | ||
"format": "boolean" | ||
} | ||
}, | ||
"need_analytics_nudge": { | ||
"type": "boolean", | ||
"format": "boolean" | ||
}, | ||
"running_tilt_build": { | ||
"$ref": "#/definitions/webviewTiltBuild" | ||
}, | ||
"latest_tilt_build": { | ||
"$ref": "#/definitions/webviewTiltBuild" | ||
}, | ||
"tilt_cloud_username": { | ||
"type": "string" | ||
}, | ||
"tilt_cloud_schemeHost": { | ||
"type": "string" | ||
}, | ||
"tilt_cloud_teamID": { | ||
"type": "string" | ||
}, | ||
"fatal_error": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
declare namespace OpenAPI2 { | ||
export interface webviewView { | ||
log?: string; | ||
resources?: webviewResource[]; | ||
logTimestamps?: boolean; | ||
featureFlags?: object; | ||
needAnalyticsNudge?: boolean; | ||
runningTiltBuild?: webviewTiltBuild; | ||
latestTiltBuild?: webviewTiltBuild; | ||
tiltCloudUsername?: string; | ||
tiltCloudSchemeHost?: string; | ||
tiltCloudTeamID?: string; | ||
fatalError?: string; | ||
} | ||
export interface webviewTiltBuild { | ||
version?: string; | ||
commitSHA?: string; | ||
date?: string; | ||
dev?: boolean; | ||
} | ||
export interface webviewResource {} | ||
} |