diff --git a/Makefile b/Makefile index 9f9e94f..3756866 100644 --- a/Makefile +++ b/Makefile @@ -3,6 +3,7 @@ CMD_NAME := go-server-with-otel VERSION ?= development API_DIR := api/ +SCHEMA_DIR := contrib/ PROTO_DIRS := $(wildcard proto/demo/app/*) # TODO: Update path (probably not demo) PLATFORMS := linux/amd64 linux/arm64 darwin/amd64 darwin/arm64 OUTPUT_DIR := bin @@ -16,7 +17,9 @@ proto: check_protoc $(API_DIR) --go_out=$(API_DIR) --go_opt=paths=source_relative \ --go-grpc_out=$(API_DIR) --go-grpc_opt=paths=source_relative \ --grpc-gateway_out=$(API_DIR) --grpc-gateway_opt=paths=source_relative \ - --openapiv2_out=$(API_DIR) \ + --openapiv2_out=$(SCHEMA_DIR) \ + --openapiv2_opt allow_merge=true \ + --openapiv2_opt merge_file_name=$(CMD_NAME) \ $(foreach dir, $(PROTO_DIRS), $(wildcard $(dir)/*.proto)) test: diff --git a/api/demo/app/v1alpha1/app.swagger.json b/contrib/go-server-with-otel.swagger.json similarity index 100% rename from api/demo/app/v1alpha1/app.swagger.json rename to contrib/go-server-with-otel.swagger.json