Browse Source

feat(main): add swagger api make file (#51)

Signed-off-by: Xinwei Xiong(cubxxw-openim) <3293172751nss@gmail.com>
tags/v0.1.0
Xinwei Xiong(cubxxw-openim) 3 years ago
parent
commit
42a7c2cc74
3 changed files with 32 additions and 2 deletions
  1. +10
    -2
      .github/labels.yml
  2. +6
    -0
      .github/weekly-digest.yml
  3. +16
    -0
      Makefile

+ 10
- 2
.github/labels.yml View File

@@ -39,5 +39,13 @@ XXL:
lines: 1000
color: E50009
comment: |
# Whoa! Easy there, Partner!
This PR is too big. Please break it up into smaller PRs.
## 🤖 Whoa! Easy there, Partner!
This PR is too big. It's over 1000. Please break it up into smaller PRs.

XXXL:
name: size/XXXL
lines: 5000
color: FF0000
comment: |
## 🤖 Whoa! Easy there, Partner!
This PR is too big. It's over 5000. Please break it up into smaller PRs.

+ 6
- 0
.github/weekly-digest.yml View File

@@ -0,0 +1,6 @@
publishDay: sun
canPublishIssues: true
canPublishPullRequests: true
canPublishContributors: true
canPublishStargazers: true
canPublishCommits: true

+ 16
- 0
Makefile View File

@@ -268,6 +268,17 @@ copyright-add: tools.verify.addlicense
@$(TOOLS_DIR)/addlicense -y $(shell date +"%Y") -v -c "OpenIM open source community." -f $(LICENSE_TEMPLATE) $(CODE_DIRS)
@echo "===========> End the copyright is added..."

## swagger: Generate swagger document.
.PHONY: swagger
swagger: tools.verify.swagger
@echo "===========> Generating swagger API docs"
@$(TOOLS_DIR)/swagger generate spec --scan-models -w $(ROOT_DIR)/cmd/gendocs -o $(ROOT_DIR)/server/docs/swagger.yaml

## serve-swagger: Serve swagger spec and docs.
.PHONY: swagger.serve
serve-swagger: tools.verify.swagger
@$(TOOLS_DIR)/swagger serve -F=redoc --no-open --port 36666 $(ROOT_DIR)/server/docs/swagger.yaml

## clean: Clean all builds.
.PHONY: clean
clean:
@@ -336,6 +347,11 @@ install.go-gitlint:
install.go-junit-report:
@$(GO) install github.com/jstemmer/go-junit-report@latest

## install.gotests: Install gotests, used to generate go tests
.PHONY: install.swagger
install.swagger:
@$(GO) install github.com/go-swagger/go-swagger/cmd/swagger@latest

# ==============================================================================
# Tools that might be used include go gvm, cos
#


Loading…
Cancel
Save