From bebe6de0391ed8f5870f0a5514a69b3355ffdac7 Mon Sep 17 00:00:00 2001 From: Kevin McDonald Date: Mon, 18 Nov 2024 18:51:05 +0100 Subject: [PATCH] Fix doc examples for string.example (#271) I noticed that the examples for string examples use integers, which is wrong. This PR updates them to actual strings. --- proto/protovalidate/buf/validate/validate.proto | 4 ++-- tools/internal/gen/buf/validate/validate.pb.go | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/proto/protovalidate/buf/validate/validate.proto b/proto/protovalidate/buf/validate/validate.proto index 7236347..53d3ba7 100644 --- a/proto/protovalidate/buf/validate/validate.proto +++ b/proto/protovalidate/buf/validate/validate.proto @@ -3732,8 +3732,8 @@ message StringRules { // ```proto // message MyString { // string value = 1 [ - // (buf.validate.field).string.example = 1, - // (buf.validate.field).string.example = 2 + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" // ]; // } // ``` diff --git a/tools/internal/gen/buf/validate/validate.pb.go b/tools/internal/gen/buf/validate/validate.pb.go index 519fc02..a52d4ea 100644 --- a/tools/internal/gen/buf/validate/validate.pb.go +++ b/tools/internal/gen/buf/validate/validate.pb.go @@ -4663,8 +4663,8 @@ type StringRules struct { // // message MyString { // string value = 1 [ - // (buf.validate.field).string.example = 1, - // (buf.validate.field).string.example = 2 + // (buf.validate.field).string.example = "hello", + // (buf.validate.field).string.example = "world" // ]; // } //