Skip to content

Commit

Permalink
Revert API path for Swagger UI to fix err
Browse files Browse the repository at this point in the history
  • Loading branch information
cb-github-robot authored Mar 27, 2024
2 parents 1bab0fc + 9a404c2 commit a008d7a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ Check out [CONTRIBUTING](https://github.com/cloud-barista/cb-tumblebug/blob/main

- Swagger API 문서 업데이트 필요 시 `cb-tumblebug/src/` 에서 `make swag` 실행
- API 문서 파일은 `cb-tumblebug/src/api/rest/docs/swagger.yaml` 에 생성됨
- 해당 API 문서는 http://localhost:1323/tumblebug/api 로컬에서 웹브라우저로 확인 가능 (CB-Tumblebug 구동 시 자동으로 제공)
- 해당 API 문서는 http://localhost:1323/tumblebug/swagger/ 로컬에서 웹브라우저로 확인 가능 (CB-Tumblebug 구동 시 자동으로 제공)
- Swagger 기반 [API 문서 업데이트 방법 상세 정보](https://github.com/cloud-barista/cb-tumblebug/wiki/API-Document-Update)

### (3) CB-Tumblebug 실행
Expand Down Expand Up @@ -263,7 +263,7 @@ Check out [CONTRIBUTING](https://github.com/cloud-barista/cb-tumblebug/blob/main


Access to API dashboard (username: default / password: default)
http://xxx.xxx.xxx.xxx:1323/tumblebug/api
http://xxx.xxx.xxx.xxx:1323/tumblebug/swagger/

⇨ http server started on [::]:1323
```
Expand Down
4 changes: 2 additions & 2 deletions i18n/README-EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ Check out [CONTRIBUTING](https://github.com/cloud-barista/cb-tumblebug/blob/main

- If Swagger API Document needs to be updated run `make swag` at `cb-tumblebug/src/` directory.
- API document file is created at `cb-tumblebug/src/api/rest/docs/swagger.yaml` directory.
- Following API document can be checked on http://localhost:1323/tumblebug/api through web browser. (Automatically provided when CB-Tumblebug is executed)
- Following API document can be checked on http://localhost:1323/tumblebug/swagger/ through web browser. (Automatically provided when CB-Tumblebug is executed)

### (3) Run CB-Tumblebug
- Run [CB-Spider](https://github.com/cloud-barista/cb-spider) in another tab
Expand Down Expand Up @@ -196,7 +196,7 @@ Check out [CONTRIBUTING](https://github.com/cloud-barista/cb-tumblebug/blob/main


Access to API dashboard (username: default / password: default)
http://xxx.xxx.xxx.xxx:1323/tumblebug/api
http://xxx.xxx.xxx.xxx:1323/tumblebug/swagger/

⇨ http server started on [::]:1323
```
Expand Down
4 changes: 2 additions & 2 deletions src/api/rest/server/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ func RunServer(port string) {
//e.colorer.Printf(banner, e.colorer.Red("v"+Version), e.colorer.Blue(website))

// Route for system management
e.GET("/tumblebug/api", echoSwagger.WrapHandler)
e.GET("/tumblebug/swagger/*", echoSwagger.WrapHandler)
// e.GET("/tumblebug/swaggerActive", rest_common.RestGetSwagger)
e.GET("/tumblebug/health", rest_common.RestGetHealth)
e.GET("/tumblebug/httpVersion", rest_common.RestCheckHTTPVersion)
Expand Down Expand Up @@ -415,7 +415,7 @@ func RunServer(port string) {
g.GET("/:nsId/testGetAssociatedObjectCount/:resourceType/:resourceId", rest_mcir.RestTestGetAssociatedObjectCount)

selfEndpoint := os.Getenv("SELF_ENDPOINT")
apidashboard := " http://" + selfEndpoint + "/tumblebug/api"
apidashboard := " http://" + selfEndpoint + "/tumblebug/swagger/"

if enableAuth {
fmt.Println(" Access to API dashboard" + " (username: " + apiUser + " / password: " + apiPass + ")")
Expand Down

0 comments on commit a008d7a

Please sign in to comment.