Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Workflow] Update Swagger REST API doc #1027

Closed
wants to merge 1 commit into from

Conversation

cb-github-robot
Copy link
Member

Update Swagger REST API doc

@jihoon-seo
Copy link
Member

jihoon-seo commented Feb 9, 2022

#1026 에서 make swag 명령을 이용하여 Swagger doc을 업데이트하고 commit 했었는데
이 PR이 생성된 것을 보니
swag 이 업데이트된 것이 아닌지 추측하였습니다.

[제 개발 환경]

❯ swag -v   
swag version v1.7.4

#1026 에 대한 Update Swagger doc workflow 실행 시, swag v1.7.9 가 실행되었습니다.

그런데, 이 PR에 대한 Build amd64 container image CI 가 fail 합니다.

제 개발 환경에서 swag을 v1.7.9 로 업데이트하고 빌드해 봐도 빌드가 되지 않습니다.

❯ go install github.com/swaggo/swag/cmd/swag@latest
go: downloading github.com/swaggo/swag v1.7.9
go: downloading github.com/go-openapi/spec v0.20.4
go: downloading golang.org/x/net v0.0.0-20210805182204-aaa1db679c0d

❯ swag -v
swag version v1.7.9

❯ make swag
❯ make
go build -mod=mod -o cb-tumblebug
# github.com/cloud-barista/cb-tumblebug/src/api/rest/docs
api/rest/docs/docs.go:6912:28: undefined: "github.com/swaggo/swag".Spec
Makefile:2: recipe for target 'default' failed
make: *** [default] Error 2

swag repo를 확인해 보니
v1.7.9 이후에 v1.7.9-p1 릴리즈가 추가되었습니다.

제 개발 환경에서 swag을 v1.7.9-p1 으로 업데이트해 보았으나,
v1.7.9 가 설치되는 것으로 보이며
문제 해결이 되지 않습니다.

❯ go install github.com/swaggo/swag/cmd/swag@v1.7.9-p1
go: downloading github.com/swaggo/swag v1.7.9-p1

❯ swag -v
swag version v1.7.9

❯ make swag
❯ make
go build -mod=mod -o cb-tumblebug
# github.com/cloud-barista/cb-tumblebug/src/api/rest/docs
api/rest/docs/docs.go:6912:20: undefined: "github.com/swaggo/swag".Spec
Makefile:2: recipe for target 'default' failed
make: *** [default] Error 2

직전 버전인 v1.7.8 로는 문제가 없는 것을 확인했습니다.

[Update Swagger REST API doc workflow 현 문제에 대한 (임시) 처리 방안]

@jihoon-seo jihoon-seo added the hold Need to hold merge label Feb 9, 2022
@seokho-son
Copy link
Member

@jihoon-seo 확인 감사합니다. :)

make-swagger.yaml 에서, 설치하는 swag 버전을 v1.7.8 로 (잠시) 고정

하는 것이 현재로썬 좋아 보이네요.
v1.7.9p1 의 상황을 보아하니,
swaggo/swag#1127 (comment)

v1.8.0 쯤 되어야 안정화되지 않을까 싶습니다.

@jihoon-seo jihoon-seo deleted the update-swagger-doc branch February 10, 2022 05:10
@jihoon-seo jihoon-seo mentioned this pull request Feb 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants