add apidocs recipe to Makefile
@@ -17,6 +17,8 @@ NPM = npm
PRETTIER = prettier
NG = ng
DOCKERCOMPOSE = docker-compose
+SWAGGO = swag
+SWAGGER2MD = swagger-markdown
###############################################
# ---------------------------------------------
@@ -125,6 +127,14 @@ devstack:
$(DOCKERCOMPOSE) -f docker-compose.dev.yml \
up -d
+PHONY += devstack
+apidocs:
+ $(SWAGGO) init \
+ -g $(CURDIR)/internal/services/webserver/v1/router.go \
+ --parseDependency --parseDepth 2
+ rm $(CURDIR)/docs/docs.go
+ $(SWAGGER2MD) -i $(CURDIR)/docs/swagger.json -o $(CURDIR)/docs/restapi.md
+
PHONY += help
help:
@echo "Available targets:"
