-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbuf.gen.yaml
77 lines (68 loc) · 2.07 KB
/
buf.gen.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
version: v2
managed:
enabled: true
override:
- file_option: go_package
module: buf.build/bufbuild/protovalidate
value: github.com/bufbuild/protovalidate-go
plugins:
# Use protoc-gen-go latest
- remote: buf.build/protocolbuffers/go
out: api
opt: paths=source_relative
# Use the latest version of protoc-gen-go-grpc
- remote: buf.build/grpc/go
out: api
opt:
- paths=source_relative
- require_unimplemented_servers=false
# Use the latest version of protoc-gen-validate
- remote: buf.build/bufbuild/validate-go
out: api
opt:
- paths=source_relative
# gen openapi for docs.
- remote: buf.build/community/google-gnostic-openapi
out: docs
opt:
- paths=source_relative
- naming=proto
# gen swagger format api docs
# - remote: buf.build/grpc-ecosystem/openapiv2
# out: docs
# gen html format for docs
- remote: buf.build/community/pseudomuto-doc
out: docs
opt:
- html,docs.html
# - markdown,docs.md
# this plugin will be installed via kratos upgrade.so use as local
- local: protoc-gen-go-http
out: api
opt:
- paths=source_relative
# supported other parameter
# omit if google.api is empty,default:true
#- omitempty=false
# if google.api is empty,use this prefix,default:""
# - omitempty_prefix=/v1
# this plugin will be installed via kratos upgrade
- local: protoc-gen-go-errors
out: api
opt:
- paths=source_relative
# ====================================================
# other purpose plugins.for more plugins,visit
# https://buf.build/plugins
# ====================================================
# to generate optimized marshalling & unmarshalling code you can use the plugin,
# but conflict with default protoc-gen-go plugin
# - remote: buf.build/community/planetscale-vtprotobuf
# out: api
# opt:
# - paths=source_relative
# gRPC to JSON proxy generator following the gRPC HTTP spec.
# - remote: buf.build/grpc-ecosystem/gateway
# out: gen
# opt:
# - paths=source_relative