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

Add swagger docs to document the API #105

Merged
merged 1 commit into from
Apr 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
/assets/output.css
/vendor/
/pkg/
/docs/swagger.*
5 changes: 5 additions & 0 deletions .swaggo
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
replace null.String string
replace null.Int64 integer
replace null.Bool boolean
replace sql.NullTime time
replace time.Duration integer
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ clean:
dev:
air

build: build-dist build-tw build-server build-docker
build: build-swagger build-dist build-tw build-server build-docker

build-server:
go build \
Expand All @@ -38,6 +38,12 @@ build-docker:
--build-arg GIT_REF_TYPE="$(GIT_REF_TYPE)" \
.

build-swagger:
swag init \
--parseDependency \
--dir ./pkg/app/,./,./vendor/gorm.io/gorm/,./vendor/github.com/codingsince1985/geo-golang/ \
--generalInfo api_handlers.go

build-tw:
npx tailwindcss -i ./main.css -o ./assets/output.css

Expand Down
Loading
Loading