Skip to content

Commit

Permalink
Merge pull request #20 from ClusterCockpit/Enable-Swagger-documentati…
Browse files Browse the repository at this point in the history
…on-for-REST-api

Enable swagger documentation for rest api
  • Loading branch information
moebiusband73 committed Jun 26, 2024
2 parents 7538570 + 14cf922 commit 362adab
Show file tree
Hide file tree
Showing 14 changed files with 1,587 additions and 147 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ jobs:
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.20.x
go-version: 1.22.x
- name: Checkout code
uses: actions/checkout@v3
- name: Build, Vet & Test
Expand Down
7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,19 @@ GIT_HASH := $(shell git rev-parse --short HEAD || echo 'development')
CURRENT_TIME = $(shell date +"%Y-%m-%d:T%H:%M:%S")
LD_FLAGS = '-s -X main.date=${CURRENT_TIME} -X main.version=${VERSION} -X main.commit=${GIT_HASH}'

.PHONY: clean test tags $(TARGET)
.PHONY: clean test tags swagger $(TARGET)

.NOTPARALLEL:

$(TARGET):
$(info ===> BUILD cc-metric-store)
@go build -ldflags=${LD_FLAGS} ./cmd/cc-metric-store

swagger:
$(info ===> GENERATE swagger)
@go run github.com/swaggo/swag/cmd/swag init -d ./internal/api,./internal/util -g api.go -o ./api
@mv ./api/docs.go ./internal/api/docs.go

clean:
$(info ===> CLEAN)
@go clean
Expand Down
Loading

0 comments on commit 362adab

Please sign in to comment.