This repository has been archived by the owner on Sep 5, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
buf.gen.yaml
96 lines (88 loc) · 3.29 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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
version: v1
plugins:
# ##############################################################################
# protoc-gen-go
# https://pkg.go.dev/google.golang.org/protobuf/cmd/protoc-gen-go
# #############################################################################
- plugin: go
out: .
opt:
- paths=source_relative
# ##############################################################################
# protoc-gen-go-grpc
# https://pkg.go.dev/google.golang.org/grpc/cmd/protoc-gen-go-grpc#section-readme
# #############################################################################
- plugin: go-grpc
out: .
opt:
- paths=source_relative
##############################################################################
# protoc-gen-validate (PGV)
# https://github.com/envoyproxy/protoc-gen-validate
# #############################################################################
- plugin: validate
out: .
opt:
- lang=go
- paths=source_relative
# ##############################################################################
# gRPC-Gateway grpc-gateway & openapi
# https://github.com/grpc-ecosystem/grpc-gateway
# https://buf.build/grpc-ecosystem/plugins/openapiv2
# https://buf.build/grpc-ecosystem/plugins/grpc-gateway
# #############################################################################
- plugin: grpc-gateway
out: .
opt:
- paths=source_relative
- name: openapiv2
out: .
opt:
- output_format=json
- allow_merge=true
- merge_file_name=book
- openapi_configuration=book.config.swagger.yaml
strategy: all
# ##############################################################################
# protoc-gen-doc
# https://github.com/pseudomuto/protoc-gen-doc
# #############################################################################
- plugin: doc
out: docs/generated/
opt: docs/generated/template.gotmpl,book.md
strategy: all
# ##############################################################################
# protoc-gen-ts_proto
# https://www.npmjs.com/package/ts-proto
# ##############################################################################
- plugin: grpc
path: node_modules/.bin/protoc-gen-ts_proto
out: packages/api-book-grpc/nodejs/src/protobuf
strategy: all
opt:
- env=node
- esModuleInterop=true
- oneof=unions
- onlyTypes=false
- outputEncodeMethods=true
- outputJsonMethods=false
- outputPartialMethods=false
- outputServices=grpc-js
- unrecognizedEnum=false
# ##############################################################################
# protoc-gen-grpc-web
# https://github.com/grpc/grpc-web
# #############################################################################
- plugin: grpc-web
out: .
opt:
- import_style=typescript
- mode=grpcweb
# ##############################################################################
# https://buf.build/grpc/python
# https://buf.build/protocolbuffers/python
# #############################################################################
- plugin: buf.build/grpc/python:v1.58.1
out: packages/api-book-grpc/python
- plugin: buf.build/protocolbuffers/python
out: packages/api-book-grpc/python