Skip to content
Merged
Show file tree
Hide file tree
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
18 changes: 9 additions & 9 deletions {{cookiecutter.app_name}}/buf.lock
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
# Generated by buf. DO NOT EDIT.
version: v2
deps:
- name: buf.build/envoyproxy/protoc-gen-validate
commit: daf171c6cdb54629b5f51e345a79e4dd
digest: b5:c745e1521879f43740230b1df673d0729f55704efefdcfc489d4a0a2d40c92a26cacfeab62813403040a8b180142d53b398c7ca784a065e43823605ee49681de
- name: buf.build/bufbuild/protovalidate
commit: 80ab13bee0bf4272b6161a72bf7034e0
digest: b5:1aa6a965be5d02d64e1d81954fa2e78ef9d1e33a0c30f92bc2626039006a94deb3a5b05f14ed8893f5c3ffce444ac008f7e968188ad225c4c29c813aa5f2daa1
- name: buf.build/googleapis/googleapis
commit: 546238c53f7340c6a2a6099fb863bc1b
digest: b5:e017bbf31a3f912e2b969c03c3aa711f466cfe104f510865d1a8ede1be490240aabd4cca5865459a0f15222747284395f98afc094b0fd086e8917a5a7bdd9db0
commit: 536964a08a534d51b8f30f2d6751f1f9
digest: b5:3e05d27e797b00c345fadd3c15cf0e16c4cc693036a55059721e66d6ce22a96264a4897658c9243bb0874fa9ca96e437589eb512189d2754604a626c632f6030
- name: buf.build/grpc-ecosystem/grpc-gateway
commit: 4c5ba75caaf84e928b7137ae5c18c26a
digest: b5:c113e62fb3b29289af785866cae062b55ec8ae19ab3f08f3004098928fbca657730a06810b2012951294326b95669547194fa84476b9e9b688d4f8bf77a0691d
commit: 6467306b4f624747aaf6266762ee7a1c
digest: b5:c2caa61467d992749812c909f93c07e9a667da33c758a7c1973d63136c23b3cafcc079985b12cdf54a10049ed3297418f1eda42cdffdcf34113792dcc3a990af
- name: buf.build/grpc-ecosystem/protoc-gen-swagger
commit: 177bd018c960492d831aee5e88594dec
digest: b5:62717e8b4ece73a14db1968e48f814f890431dacdde35f631d2e9412a1522a13eaa9d208875e809a9c772bc52d56a04128a1befd6445163826984f0856797f83
- name: buf.build/grpc/grpc
commit: 9327911dce6e4b51a37ad5e93578c833
digest: b5:4778e2461d27be4f17d557ee958ba034281151f838c1608c7c367c8e81d20def24466cd7173a5e9cef66db26dda9bb25f66bc32aa7b26957640fc2a98b7db02a
commit: 1730f7242d0f45138a638b7612d46586
digest: b5:2998161006b920a3e2cadf8855e008a7a5f4922a5ac699695db3e08beac0f3bee5429a71223b645bc5145b9725309768dcd36937be4b886b947994c45320d795
2 changes: 1 addition & 1 deletion {{cookiecutter.app_name}}/buf.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ modules:
lint:
disallow_comment_ignores: true
deps:
- buf.build/envoyproxy/protoc-gen-validate
- buf.build/bufbuild/protovalidate
Comment thread
coderabbitai[bot] marked this conversation as resolved.
- buf.build/googleapis/googleapis
Comment thread
ankurs marked this conversation as resolved.
- buf.build/grpc/grpc
- buf.build/grpc-ecosystem/protoc-gen-swagger
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ package {{cookiecutter.grpc_package}};

option go_package = "{{cookiecutter.source_path}}/{{cookiecutter.app_name}}/proto;{{cookiecutter.app_name|lower|replace('.', '_')}}";

import "buf/validate/validate.proto";
Comment thread
coderabbitai[bot] marked this conversation as resolved.
import "google/api/annotations.proto";
import "protoc-gen-openapiv2/options/annotations.proto";
import "google/api/httpbody.proto";
Expand All @@ -23,7 +24,9 @@ option (grpc.gateway.protoc_gen_openapiv2.options.openapiv2_swagger) = {
};

message EchoRequest{
string msg = 1;
// msg must be at least 1 character — validated automatically by the
// protovalidate interceptor. Sending an empty string returns InvalidArgument.
string msg = 1 [(buf.validate.field).string.min_len = 1];
}
message EchoResponse{
string msg = 1;
Expand Down
Loading