rookie-ninja / rk-boot

Build microservice with rk-boot and let the team take over clean and tidy code.

Home Page:https://rkdev.info

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Swagger API path config doesnt work in boot.yaml

aaydinyan opened this issue · comments

I am trying to set a custom swagger api path, but it works only for default "sw" path.

To Reproduce
Set config in boot.yaml file:
sw: enabled: true path: "api-docs" jsonPath: "docs"

@aaydinyan It is a bug SwEntry in rk-xxx series. It is not a big changes.

I will fix the bug and bump up version of rk-xxx series by the end of today. I guess it may take me couple of hours to fix the bug, test and bump up version.

I will leave detailed message here as soon as I bump up the version.

Problem description

sw.path is not working properly.

Root cause

Swagger path variable in swagger file handler in SwEntry was hard coded as "/sw". It needs to be replaced by SwEntry.Path.

Commits of bug fix

pkg commits
rk-boot #45
rk-echo be22d93ff2505b915ecf53f156e9a0da2cd42ecc
rk-fiber c2ca03c729939784428c7a01f662c80aaac1554c
rk-gf 42c095eeb1858229c34bb753b7816f501c266d6a
rk-gin bf7c44abcbf5d806bbf794505224849b1675a471
rk-grpc 1aa48642c33bb10b6aa4c3fdcb2d2c1c9d938112
rk-mux e982ac2817cdc5fea2253f1a645141eea0755a12
rk-zero 251b11b8f464ca41b6469b6fc6f46a2d1b20485e

Otherwise, fixed grpc-gateway option issues caused by new grpc-gateway version. commit

Please bump up to newest version as bellow

Please choose web framework to import. From v1.4.x, no need to import all web frameworks at once.

Frameworks Stage Tag Installation Dependency
Gin Stable v1.2.14 go get github.com/rookie-ninja/rk-boot/gin rk-gin
gRPC Stable v1.2.18 go get github.com/rookie-ninja/rk-boot/grpc rk-grpc
Echo Stable v0.0.8 go get github.com/rookie-ninja/rk-boot/echo rk-echo
GoFrame Stable v0.0.5 go get github.com/rookie-ninja/rk-boot/gf rk-gf
Fiber Testing v0.0.3 go get github.com/rookie-ninja/rk-boot/fiber rk-fiber
go-zero Testing v0.0.2 go get github.com/rookie-ninja/rk-boot/zero rk-zero
GorillaMux Testing v0.0.2 go get github.com/rookie-ninja/rk-boot/mux rk-mux

Please reopen this issue if any problems related to this

@aaydinyan Please import new version rk-boot as needed. Reopen this issue if problems exists related to this problem.

Thanks