From e877603d6d1384bbf7491d79b7d805b6c868de5d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juan=20Pablo=20Villaf=C3=A1=C3=B1ez?= Date: Thu, 13 Jan 2022 11:34:38 +0100 Subject: [PATCH] Adjust Makefile and regenerate protobuf --- Makefile | 21 +++++++++++++++---- .../accounts/v1/accounts.swagger.json | 9 +++++--- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/Makefile b/Makefile index de9c6924ba..6932cff786 100644 --- a/Makefile +++ b/Makefile @@ -163,11 +163,24 @@ go-coverage: echo -n "% coverage $$mod: "; $(MAKE) --no-print-directory -C $$mod go-coverage; \ done +# bingo creates symlinks from the -l option in GOBIN, from where +# we can easily use it with buf. To have the symlinks inside this +# repo and on a known location, we set GOBIN to .bingo in the root +# of the repository (therefore we need to cd ..) +.PHONY: protoc-deps +protoc-deps: $(BINGO) + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l google.golang.org/protobuf/cmd/protoc-gen-go + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/asim/go-micro/cmd/protoc-gen-micro/v4 + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/owncloud/protoc-gen-microweb + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2 + @GOPATH="" GOBIN=".bingo" $(BINGO) get -l github.com/pseudomuto/protoc-gen-doc/cmd/protoc-gen-doc + +.PHONY: buf-generate +buf-generate: $(BUF) protoc-deps + cd protogen/proto && $(BUF) generate + .PHONY: protobuf -protobuf: - @for mod in $(OCIS_MODULES); do \ - echo -n "% protobuf $$mod: "; $(MAKE) --no-print-directory -C $$mod protobuf; \ - done +protobuf: buf-generate .PHONY: bingo-update bingo-update: $(BINGO) diff --git a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json index e81d6f903c..37c4e9bed2 100644 --- a/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json +++ b/protogen/gen/ocis/services/accounts/v1/accounts.swagger.json @@ -389,7 +389,8 @@ "description": "The id of the group to add a member to", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "body", @@ -435,7 +436,8 @@ "description": "The id of the group to remove a member from", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "accountId", @@ -482,7 +484,8 @@ "description": "The id of the group to list members from", "in": "path", "required": true, - "type": "string" + "type": "string", + "pattern": "[^/]+" }, { "name": "body",