Skip to content

Commit

Permalink
Remove all openapi code (#1732)
Browse files Browse the repository at this point in the history
  • Loading branch information
Alex-Tideman committed Nov 7, 2023
1 parent 64238eb commit 485ba0b
Show file tree
Hide file tree
Showing 27 changed files with 3 additions and 267 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/playwright.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build UI Server
working-directory: server
run: make install-utils build
run: make build
- name: Install Playwright Browsers
run: pnpm exec playwright install --with-deps
- name: Run E2E tests
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ jobs:

- name: build
working-directory: server
run: make install-utils build
run: make build

- name: test
working-directory: server
Expand Down
2 changes: 0 additions & 2 deletions .github/workflows/update-ui-server.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@ jobs:
with:
version: '3.x'
repo-token: ${{ secrets.GITHUB_TOKEN }}
- name: Build GRPC
run: cd server && make install-utils build-grpc

- name: Checkout UI Server
uses: actions/checkout@v3
Expand Down
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ node_modules
/bin
server/ui-server
server/api
server/openapi/assets/temporal
server/ui/assets
/test-results/
/playwright-report/
Expand Down
9 changes: 0 additions & 9 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,6 @@ You can start a Temporal server in development using the following command:
temporal server start-dev
```

You can access the UI by visiting `http://localhost:8233`. OpenAPI is accessible at `http://localhost:8233/openapi/`.

[temporal cli]: https://github.com/temporalio/cli
[homebrew]: https://brew.sh

Expand Down Expand Up @@ -49,13 +47,6 @@ git submodule update

This clones the [Temporal API Protos](https://github.com/temporalio/api) into the git submodule, which is required for local development of the UI when running against a local version of the UI server.

```bash
cd server/
make install-utils
```

This installs various Go dependencies which are required for compiling the gRPC protos for running a local version of the UI server.


To run a local development version of the Svelte application via Vite, run `pnpm dev`. The application will run on [http://localhost:3000]() against a local ui-server running along with Temporal server from the temporal-cli.

Expand Down
12 changes: 1 addition & 11 deletions server/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.ONESHELL:
.PHONY:

all: install-utils build
all: build

##### Variables ######

Expand All @@ -21,16 +21,6 @@ build-server:
go mod tidy
go build -o ui-server ./cmd/server/main.go

##### Install dependencies #####

install-utils:
@go install github.com/temporalio/gogo-protobuf/protoc-gen-gogoslick@latest
@GO111MODULE=off go get github.com/temporalio/gogo-protobuf/protoc-gen-gogoslick
@go install google.golang.org/grpc/cmd/protoc-gen-go-grpc@latest

@go install github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway@latest
@go install github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2@latest

##### Test #####
test: clean-test-results
@printf $(COLOR) "Running unit tests..."
Expand Down
1 change: 0 additions & 1 deletion server/config/development.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
publicPath:
port: 8081
enableUi: true
enableOpenApi: true
cors:
cookieInsecure: false
allowOrigins:
Expand Down
1 change: 0 additions & 1 deletion server/docker/config-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ port: {{ default .Env.TEMPORAL_UI_PORT "8080" }}
publicPath: {{ default .Env.TEMPORAL_UI_PUBLIC_PATH "" }}
enableUi: {{ default .Env.TEMPORAL_UI_ENABLED "true" }}
cloudUi: {{ default .Env.TEMPORAL_CLOUD_UI "false" }}
enableOpenApi: {{ default .Env.TEMPORAL_OPENAPI_ENABLED "true" }}
defaultNamespace: {{ default .Env.TEMPORAL_DEFAULT_NAMESPACE "default" }}
feedbackUrl: {{ default .Env.TEMPORAL_FEEDBACK_URL "" }}
notifyOnNewVersion: {{ default .Env.TEMPORAL_NOTIFY_ON_NEW_VERSION "true" }}
Expand Down
3 changes: 0 additions & 3 deletions server/openapi/assets/README.md

This file was deleted.

Binary file removed server/openapi/assets/favicon-16x16.png
Binary file not shown.
Binary file removed server/openapi/assets/favicon-32x32.png
Binary file not shown.
16 changes: 0 additions & 16 deletions server/openapi/assets/index.css

This file was deleted.

19 changes: 0 additions & 19 deletions server/openapi/assets/index.html

This file was deleted.

79 changes: 0 additions & 79 deletions server/openapi/assets/oauth2-redirect.html

This file was deleted.

22 changes: 0 additions & 22 deletions server/openapi/assets/swagger-initializer.js

This file was deleted.

3 changes: 0 additions & 3 deletions server/openapi/assets/swagger-ui-bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion server/openapi/assets/swagger-ui-bundle.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions server/openapi/assets/swagger-ui-standalone-preset.js

This file was deleted.

1 change: 0 additions & 1 deletion server/openapi/assets/swagger-ui-standalone-preset.js.map

This file was deleted.

3 changes: 0 additions & 3 deletions server/openapi/assets/swagger-ui.css

This file was deleted.

1 change: 0 additions & 1 deletion server/openapi/assets/swagger-ui.css.map

This file was deleted.

2 changes: 0 additions & 2 deletions server/openapi/assets/swagger-ui.js

This file was deleted.

1 change: 0 additions & 1 deletion server/openapi/assets/swagger-ui.js.map

This file was deleted.

13 changes: 0 additions & 13 deletions server/openapi/embed.go

This file was deleted.

1 change: 0 additions & 1 deletion server/server/config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ type (
EnableUI bool `yaml:"enableUi"`
CloudUI bool `yaml:"cloudUi"`
UIAssetPath string `yaml:"uiAssetPath"`
EnableOpenAPI bool `yaml:"enableOpenApi"`
CORS CORS `yaml:"cors"`
DefaultNamespace string `yaml:"defaultNamespace"`
FeedbackURL string `yaml:"feedbackUrl"`
Expand Down
64 changes: 0 additions & 64 deletions server/server/route/openapi.go

This file was deleted.

8 changes: 0 additions & 8 deletions server/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ import (
"github.com/temporalio/ui-server/v2/server/route"
"github.com/temporalio/ui-server/v2/server/server_options"

"github.com/temporalio/ui-server/v2/openapi"
"github.com/temporalio/ui-server/v2/ui"
)

Expand Down Expand Up @@ -102,13 +101,6 @@ func NewServer(opts ...server_options.ServerOption) *Server {
route.SetHealthRoute(e)
route.SetAPIRoutes(e, cfgProvider, serverOpts.APIMiddleware)
route.SetAuthRoutes(e, cfgProvider)
if cfg.EnableOpenAPI {
assets, err := openapi.Assets()
if err != nil {
panic(err)
}
route.SetOpenAPIUIRoutes(e, assets)
}
if cfg.EnableUI {
var assets fs.FS
if cfg.UIAssetPath != "" {
Expand Down

0 comments on commit 485ba0b

Please sign in to comment.