Skip to content

Commit

Permalink
Revert protovalidate-testing changes (#254)
Browse files Browse the repository at this point in the history
Reverts the protovalidate-testing changes back to the state it was in on
v0.7.1. This won't compile but is needed so that the main module can be
updated independently.
  • Loading branch information
jchadwick-buf authored Sep 20, 2024
1 parent 81eafa5 commit 4b5f873
Show file tree
Hide file tree
Showing 30 changed files with 6,295 additions and 16,695 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,3 @@ message BoolConstTrue {
message BoolConstFalse {
bool val = 1 [(buf.validate.field).bool.const = false];
}
message BoolExample {
bool val = 1 [(buf.validate.field).bool.example = true];
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,27 +76,15 @@ message BytesSuffix {
message BytesIP {
bytes val = 1 [(buf.validate.field).bytes.ip = true];
}
message BytesNotIP {
bytes val = 1 [(buf.validate.field).bytes.ip = false];
}
message BytesIPv4 {
bytes val = 1 [(buf.validate.field).bytes.ipv4 = true];
}
message BytesNotIPv4 {
bytes val = 1 [(buf.validate.field).bytes.ipv4 = false];
}
message BytesIPv6 {
bytes val = 1 [(buf.validate.field).bytes.ipv6 = true];
}
message BytesNotIPv6 {
bytes val = 1 [(buf.validate.field).bytes.ipv6 = false];
}
message BytesIPv6Ignore {
bytes val = 1 [
(buf.validate.field).bytes.ipv6 = true,
(buf.validate.field).ignore_empty = true
];
}
message BytesExample {
bytes val = 1 [(buf.validate.field).bytes.example = "\x99"];
}
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,3 @@ message EnumInsideOneof {
}];
}
}

message EnumExample {
TestEnum val = 1 [(buf.validate.field).enum.example = 2];
}
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,6 @@ message FloatExGTELTE {
message FloatFinite {
float val = 1 [(buf.validate.field).float.finite = true];
}
message FloatNotFinite {
float val = 1 [(buf.validate.field).float.finite = false];
}
message FloatIgnore {
float val = 1 [
(buf.validate.field).float = {
Expand All @@ -93,10 +90,6 @@ message FloatIncorrectType {
float val = 1 [(buf.validate.field).double.gt = 0];
}

message FloatExample {
float val = 1 [(buf.validate.field).float.example = 8];
}

message DoubleNone {
double val = 1;
}
Expand Down Expand Up @@ -155,9 +148,6 @@ message DoubleExGTELTE {
message DoubleFinite {
double val = 1 [(buf.validate.field).double.finite = true];
}
message DoubleNotFinite {
double val = 1 [(buf.validate.field).double.finite = false];
}
message DoubleIgnore {
double val = 1 [
(buf.validate.field).double = {
Expand All @@ -172,10 +162,6 @@ message DoubleIncorrectType {
double val = 1 [(buf.validate.field).float.gt = 0];
}

message DoubleExample {
double val = 1 [(buf.validate.field).double.example = 0];
}

message Int32None {
int32 val = 1;
}
Expand Down Expand Up @@ -245,10 +231,6 @@ message Int32IncorrectType {
int32 val = 1 [(buf.validate.field).float.gt = 0];
}

message Int32Example {
int32 val = 1 [(buf.validate.field).int32.example = 10];
}

message Int64None {
int64 val = 1;
}
Expand Down Expand Up @@ -343,10 +325,6 @@ message Int64IncorrectType {
int64 val = 1 [(buf.validate.field).float.gt = 0];
}

message Int64Example {
int64 val = 1 [(buf.validate.field).int64.example = 10];
}

message UInt32None {
uint32 val = 1;
}
Expand Down Expand Up @@ -416,10 +394,6 @@ message UInt32IncorrectType {
uint32 val = 1 [(buf.validate.field).float.gt = 0];
}

message UInt32Example {
uint32 val = 1 [(buf.validate.field).uint32.example = 0];
}

message UInt64None {
uint64 val = 1;
}
Expand Down Expand Up @@ -489,10 +463,6 @@ message UInt64IncorrectType {
uint64 val = 1 [(buf.validate.field).float.gt = 0];
}

message UInt64Example {
uint64 val = 1 [(buf.validate.field).uint64.example = 0];
}

message SInt32None {
sint32 val = 1;
}
Expand Down Expand Up @@ -562,10 +532,6 @@ message SInt32IncorrectType {
sint32 val = 1 [(buf.validate.field).float.gt = 0];
}

message SInt32Example {
sint32 val = 1 [(buf.validate.field).sint32.example = 0];
}

message SInt64None {
sint64 val = 1;
}
Expand Down Expand Up @@ -634,10 +600,6 @@ message SInt64IncorrectType {
sint64 val = 1 [(buf.validate.field).float.gt = 0];
}

message SInt64Example {
sint64 val = 1 [(buf.validate.field).sint64.example = 0];
}

message Fixed32None {
fixed32 val = 1;
}
Expand Down Expand Up @@ -707,10 +669,6 @@ message Fixed32IncorrectType {
fixed32 val = 1 [(buf.validate.field).float.gt = 0];
}

message Fixed32Example {
fixed32 val = 1 [(buf.validate.field).fixed32.example = 0];
}

message Fixed64None {
fixed64 val = 1;
}
Expand Down Expand Up @@ -780,10 +738,6 @@ message Fixed64IncorrectType {
fixed64 val = 1 [(buf.validate.field).float.gt = 0];
}

message Fixed64Example {
fixed64 val = 1 [(buf.validate.field).fixed64.example = 0];
}

message SFixed32None {
sfixed32 val = 1;
}
Expand Down Expand Up @@ -853,10 +807,6 @@ message SFixed32IncorrectType {
sfixed32 val = 1 [(buf.validate.field).float.gt = 0];
}

message SFixed32Example {
sfixed32 val = 1 [(buf.validate.field).sfixed32.example = 0];
}

message SFixed64None {
sfixed64 val = 1;
}
Expand Down Expand Up @@ -926,10 +876,6 @@ message SFixed64IncorrectType {
sfixed64 val = 1 [(buf.validate.field).float.gt = 0];
}

message SFixed64Example {
sfixed64 val = 1 [(buf.validate.field).sfixed64.example = 0];
}

message Int64LTEOptional {
optional int64 val = 1 [(buf.validate.field).int64.lte = 64];
}
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,6 @@ message RepeatedExact {
message RepeatedUnique {
repeated string val = 1 [(buf.validate.field).repeated.unique = true];
}
message RepeatedNotUnique {
repeated string val = 1 [(buf.validate.field).repeated.unique = false];
}
message RepeatedMultipleUnique {
repeated string a = 1 [(buf.validate.field).repeated.unique = true];
repeated int32 b = 2 [(buf.validate.field).repeated.unique = true];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -103,99 +103,51 @@ message StringSuffix {
message StringEmail {
string val = 1 [(buf.validate.field).string.email = true];
}
message StringNotEmail {
string val = 1 [(buf.validate.field).string.email = false];
}
message StringAddress {
string val = 1 [(buf.validate.field).string.address = true];
}
message StringNotAddress {
string val = 1 [(buf.validate.field).string.address = false];
}
message StringHostname {
string val = 1 [(buf.validate.field).string.hostname = true];
}
message StringNotHostname {
string val = 1 [(buf.validate.field).string.hostname = false];
}
message StringIP {
string val = 1 [(buf.validate.field).string.ip = true];
}
message StringNotIP {
string val = 1 [(buf.validate.field).string.ip = false];
}
message StringIPv4 {
string val = 1 [(buf.validate.field).string.ipv4 = true];
}
message StringNotIPv4 {
string val = 1 [(buf.validate.field).string.ipv4 = false];
}
message StringIPv6 {
string val = 1 [(buf.validate.field).string.ipv6 = true];
}
message StringNotIPv6 {
string val = 1 [(buf.validate.field).string.ipv6 = false];
}
message StringIPWithPrefixLen {
string val = 1 [(buf.validate.field).string.ip_with_prefixlen = true];
}
message StringNotIPWithPrefixLen {
string val = 1 [(buf.validate.field).string.ip_with_prefixlen = false];
}
message StringIPv4WithPrefixLen {
string val = 1 [(buf.validate.field).string.ipv4_with_prefixlen = true];
}
message StringNotIPv4WithPrefixLen {
string val = 1 [(buf.validate.field).string.ipv4_with_prefixlen = false];
}
message StringIPv6WithPrefixLen {
string val = 1 [(buf.validate.field).string.ipv6_with_prefixlen = true];
}
message StringNotIPv6WithPrefixLen {
string val = 1 [(buf.validate.field).string.ipv6_with_prefixlen = false];
}
message StringIPPrefix {
string val = 1 [(buf.validate.field).string.ip_prefix = true];
}
message StringNotIPPrefix {
string val = 1 [(buf.validate.field).string.ip_prefix = false];
}
message StringIPv4Prefix {
string val = 1 [(buf.validate.field).string.ipv4_prefix = true];
}
message StringNotIPv4Prefix {
string val = 1 [(buf.validate.field).string.ipv4_prefix = false];
}
message StringIPv6Prefix {
string val = 1 [(buf.validate.field).string.ipv6_prefix = true];
}
message StringNotIPv6Prefix {
string val = 1 [(buf.validate.field).string.ipv6_prefix = false];
}
message StringURI {
string val = 1 [(buf.validate.field).string.uri = true];
}
message StringNotURI {
string val = 1 [(buf.validate.field).string.uri = false];
}
message StringURIRef {
string val = 1 [(buf.validate.field).string.uri_ref = true];
}
message StringNotURIRef {
string val = 1 [(buf.validate.field).string.uri_ref = false];
}
message StringUUID {
string val = 1 [(buf.validate.field).string.uuid = true];
}
message StringNotUUID {
string val = 1 [(buf.validate.field).string.uuid = false];
}
message StringTUUID {
string val = 1 [(buf.validate.field).string.tuuid = true];
}
message StringNotTUUID {
string val = 1 [(buf.validate.field).string.tuuid = false];
}
message StringHttpHeaderName {
string val = 1 [(buf.validate.field).string.well_known_regex = KNOWN_REGEX_HTTP_HEADER_NAME];
}
Expand Down Expand Up @@ -243,7 +195,3 @@ message StringHostAndOptionalPort {
expression: "this.isHostAndPort(false)"
}];
}

message StringExample {
string val = 1 [(buf.validate.field).string.example = "foo"];
}
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,3 @@ message DurationFieldWithOtherFields {
google.protobuf.Duration duration_val = 1 [(buf.validate.field).duration.lte = {seconds: 1}];
int32 int_val = 2 [(buf.validate.field).int32.gt = 16];
}

message DurationExample {
google.protobuf.Duration val = 1 [(buf.validate.field).duration.example = {seconds: 3}];
}
Original file line number Diff line number Diff line change
Expand Up @@ -69,15 +69,9 @@ message TimestampExGTELTE {
message TimestampLTNow {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lt_now = true];
}
message TimestampNotLTNow {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.lt_now = false];
}
message TimestampGTNow {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gt_now = true];
}
message TimestampNotGTNow {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.gt_now = false];
}

message TimestampWithin {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.within.seconds = 3600];
Expand All @@ -95,7 +89,3 @@ message TimestampGTNowWithin {
within: {seconds: 3600}
}];
}

message TimestampExample {
google.protobuf.Timestamp val = 1 [(buf.validate.field).timestamp.example = {seconds: 3}];
}
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ proto_library(
strip_import_prefix = "/proto/protovalidate-testing",
visibility = ["//visibility:public"],
deps = [
"//proto/protovalidate/buf/validate:validate_proto",
"@buf_deps_proto_protovalidate-testing//buf/validate:validate_proto",
"@com_google_protobuf//:any_proto",
"@com_google_protobuf//:descriptor_proto",
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ syntax = "proto3";

package buf.validate.conformance.harness;

import "buf/validate/validate.proto";
import "buf/validate/expression.proto";

Check failure on line 19 in proto/protovalidate-testing/buf/validate/conformance/harness/harness.proto

View workflow job for this annotation

GitHub Actions / buf

import "buf/validate/expression.proto": file does not exist

Check failure on line 19 in proto/protovalidate-testing/buf/validate/conformance/harness/harness.proto

View workflow job for this annotation

GitHub Actions / buf

import "buf/validate/expression.proto": file does not exist

Check failure on line 19 in proto/protovalidate-testing/buf/validate/conformance/harness/harness.proto

View workflow job for this annotation

GitHub Actions / buf

import "buf/validate/expression.proto": file does not exist
import "google/protobuf/any.proto";
import "google/protobuf/descriptor.proto";

Expand Down
Loading

0 comments on commit 4b5f873

Please sign in to comment.