Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add buf.gen.yaml v2 schema example #138

Merged
merged 1 commit into from
Aug 16, 2024
Merged
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
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,7 @@ the generated code via `buf.build/gen/go/bufbuild/protovalidate/protocolbuffers/
If you are using Buf [managed mode](https://buf.build/docs/generate/managed-mode/) to augment Go code generation, ensure
that the `protovalidate` module is excluded in your [`buf.gen.yaml`](https://buf.build/docs/configuration/v1/buf-gen-yaml#except):

**`buf.gen.yaml` v1**
```yaml
version: v1
# <snip>
Expand All @@ -108,6 +109,18 @@ managed:
# <snip>
```

**`buf.gen.yaml` v2**
```yaml
version: v2
# <snip>
managed:
enabled: true
disable:
- file_option: go_package_prefix
module: buf.build/bufbuild/protovalidate
# <snip>
```

### Example

```go
Expand Down
Loading