chore: update makefile and add new tool

this tool will generate group-related swagger schemas without repeating the same comments twice in different places
This commit is contained in:
☙◦ The Tablet ❀ GamerGirlandCo ◦❧
2026-04-02 20:00:59 -04:00
parent d37bbd29d5
commit dcc372105b
3 changed files with 15204 additions and 5 deletions
+3
View File
@@ -151,6 +151,7 @@ ESLINT_CONCURRENCY ?= 2
SWAGGER_SPEC := templates/swagger/v1_json.tmpl
SWAGGER_SPEC_INPUT := templates/swagger/v1_input.json
SWAGGER_SPEC_GROUP_INPUT := templates/swagger/v1_groups.json
SWAGGER_EXCLUDE := code.gitea.io/sdk
TEST_MYSQL_HOST ?= mysql:3306
@@ -238,6 +239,8 @@ generate-swagger: $(SWAGGER_SPEC) ## generate the swagger spec from code comment
$(SWAGGER_SPEC): $(GO_SOURCES) $(SWAGGER_SPEC_INPUT)
$(GO) run $(SWAGGER_PACKAGE) generate spec --exclude "$(SWAGGER_EXCLUDE)" --input "$(SWAGGER_SPEC_INPUT)" --output './$(SWAGGER_SPEC)'
$(GO) generate -v ./build_tools/...
$(GO) run $(SWAGGER_PACKAGE) mixin -o './$(SWAGGER_SPEC)' $(SWAGGER_SPEC) $(SWAGGER_SPEC_GROUP_INPUT)
.PHONY: swagger-check
swagger-check: generate-swagger