Skip to content
Draft
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
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ generate: patch-swagger-doc format
go mod vendor

patch-swagger-doc: buf-gen
#./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json
./scripts/update_swagger.sh docs/openapiv2/apidocs.swagger.json

init-git-hooks:
git config --local core.hooksPath .githooks/
Expand Down
17 changes: 17 additions & 0 deletions buf.gen.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,19 @@ version: v2
managed:
enabled: true
override:
# Standard go_package_prefix for our own proto files
- file_option: go_package_prefix
value: github.com/openkcm/api-sdk/proto
# Override for Google API dependencies to use the standard googleapis Go packages
# instead of generating them locally. This prevents import conflicts and uses
# the well-maintained googleapis packages from google.golang.org/genproto
- path: google/api
file_option: go_package
value: google.golang.org/genproto/googleapis/api/annotations;annotations
# Override for grpc-gateway OpenAPI v2 dependencies to use the standard grpc-gateway Go packages
- path: protoc-gen-openapiv2/options/annotations.proto
file_option: go_package
value: github.com/grpc-ecosystem/grpc-gateway/v2/protoc-gen-openapiv2/options;options
plugins:
- remote: buf.build/protocolbuffers/go
out: proto
Expand All @@ -19,5 +30,11 @@ plugins:
out: proto
opt:
- paths=source_relative
- remote: buf.build/grpc-ecosystem/openapiv2
out: docs/openapiv2
opt:
- allow_merge=true
- merge_file_name=apidocs
- allow_delete_body=true
inputs:
- directory: proto
3 changes: 3 additions & 0 deletions buf.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
version: v2
modules:
- path: proto
deps:
- buf.build/googleapis/googleapis
- buf.build/grpc-ecosystem/grpc-gateway
lint:
use:
- STANDARD
Expand Down
Loading
Loading