Skip to content

Commit 9a90cb3

Browse files
Update README for buf v2 commands/config (#197)
1 parent 7e9bc86 commit 9a90cb3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

README.md

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,31 +82,31 @@ message Transaction {
8282

8383
When using the runtime library after installing it with `pip`, it's necessary to generate the Python code for the core `buf.protovalidate` Protobuf package. `buf` provides an efficient method for this:
8484

85-
1. **Initialize a New Configuration File**:
85+
1. **Initialize a New Configuration File**:
8686
```shell
87-
buf mod init
87+
buf config init
8888
```
8989
This initializes the `buf.yaml` configuration file at the root of the Protobuf source files.
9090

9191
2. **Module Configuration and Dependencies**:
9292
```yaml
9393
# buf.yaml
94-
version: v1
95-
deps:
94+
version: v2
95+
deps:
9696
- buf.build/bufbuild/protovalidate
9797
```
9898
9999
Ensure your dependencies are up-to-date with:
100100
```shell
101-
buf mod update
101+
buf dep update
102102
```
103103

104104
3. **Setup Code Generation**:
105105
```yaml
106106
# buf.gen.yaml
107-
version: v1
107+
version: v2
108108
plugins:
109-
- plugin: buf.build/protocolbuffers/python:v23.4
109+
- remote: buf.build/protocolbuffers/python
110110
out: gen
111111
```
112112

0 commit comments

Comments
 (0)