Skip to content
This repository has been archived by the owner on Dec 12, 2024. It is now read-only.

Commit

Permalink
Revert "Swagger workflow (#249)" (#251)
Browse files Browse the repository at this point in the history
This reverts commit 888ca45.
  • Loading branch information
andresuribe87 authored Jan 12, 2023
1 parent 888ca45 commit a3d5e1b
Show file tree
Hide file tree
Showing 4 changed files with 39 additions and 47 deletions.
37 changes: 37 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,43 @@ jobs:
- name: Check Vulnerabilities
run: mage -v vuln

generate-spec:
runs-on: ubuntu-latest
steps:
- name: fetch history
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 1.19.4
cache: true

- name: Install Mage
run: go install github.com/magefile/mage

- name: Update to latest spec
shell: bash
run: |
export PATH=$PATH:$(go env GOPATH)/bin
go install github.com/swaggo/swag/cmd/[email protected]
mage spec
- name: Push generated spec file
uses: actions/checkout@v3
- run: |
git config --global user.name "${GITHUB_ACTOR}"
git config --global user.email "${GITHUB_ACTOR}@users.noreply.github.com"
if (git diff --shortstat | grep '[0-9]'); then \
git add .; \
git commit -m "gen OpenAPI Spec by github-actions"; \
git push
fi
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
build:
runs-on: ubuntu-latest
steps:
Expand Down
41 changes: 0 additions & 41 deletions .github/workflows/swagger-doc.yml

This file was deleted.

6 changes: 1 addition & 5 deletions magefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -108,11 +108,7 @@ func Integration() error {
// Spec generates an OpenAPI spec yaml based on code annotations.
func Spec() error {
swagCommand := "swag"
if err := installIfNotPresent(swagCommand, "github.com/swaggo/swag/cmd/[email protected]"); err != nil {
logrus.Fatal(err)
return err
}
if err := sh.Run(swagCommand, "fmt", "-d", "pkg/server/router"); err != nil {
if err := installIfNotPresent(swagCommand, "github.com/swaggo/swag/cmd/swag@latest"); err != nil {
logrus.Fatal(err)
return err
}
Expand Down
2 changes: 1 addition & 1 deletion pkg/server/router/presentation.go
Original file line number Diff line number Diff line change
Expand Up @@ -374,7 +374,7 @@ type ReviewSubmissionResponse struct {
}

// ReviewSubmission godoc
// @Summary Review a pending submission
// @Summary Review a pending submissions
// @Description Reviews a pending submission. After this method is called, the operation with `id==presentations/submissions/{submission_id}` will be updated with the result of this invocation.
// @Tags SubmissionAPI
// @Accept json
Expand Down

0 comments on commit a3d5e1b

Please sign in to comment.