Skip to content

Commit ada7a2e

Browse files
update readme w/ buf config
1 parent 5ddf29a commit ada7a2e

File tree

3 files changed

+37
-5
lines changed

3 files changed

+37
-5
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,40 @@ Support:
99
## Python Types (@dataclass)
1010
This template generates basic Python Dataclasses from Proto Messages.
1111

12+
<details>
13+
<summary>Buf Configuration</summary>
14+
15+
16+
```yaml
17+
# ./proto/buf.gen.yaml
18+
version: v1
19+
managed:
20+
enabled: true
21+
go_package_prefix:
22+
default: github.com/fraser-isbester/gapic-python-basic/examples/simple-types
23+
plugins:
24+
- plugin: python_gapic
25+
out: ../gen/python
26+
opt:
27+
- python-gapic-templates=/Users/fraser/code/gapic-python-basic/templates/dataclasses
28+
29+
```
30+
31+
```yaml
32+
# ./proto/buf.yaml
33+
version: v1
34+
name: buf.build/fraser/simple-types
35+
breaking:
36+
use:
37+
- FILE
38+
lint:
39+
use:
40+
- DEFAULT
41+
- COMMENTS
42+
```
43+
44+
</details>
45+
1246
<details>
1347
<summary>Proto Definition</summary>
1448

examples/simple-types/proto/buf.gen.yaml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1+
# ./proto/buf.gen.yaml
2+
13
version: v1
24
managed:
35
enabled: true
46
go_package_prefix:
57
default: github.com/fraser-isbester/gapic-python-basic/examples/simple-types
68
plugins:
7-
- plugin: buf.build/protocolbuffers/go
8-
out: ../gen/go
9-
opt: paths=source_relative
109
- plugin: python_gapic
1110
out: ../gen/python
1211
opt:
Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
# ./proto/buf.yaml
12
version: v1
23
name: buf.build/fraser/simple-types
34
breaking:
@@ -7,5 +8,3 @@ lint:
78
use:
89
- DEFAULT
910
- COMMENTS
10-
- UNARY_RPC
11-
- PACKAGE_NO_IMPORT_CYCLE

0 commit comments

Comments
 (0)