Skip to content

Commit

Permalink
Switch to datatracker.ietf.org for RFC links (#306)
Browse files Browse the repository at this point in the history
  • Loading branch information
timostamm authored Feb 4, 2025
1 parent d0efa63 commit c30dd1b
Show file tree
Hide file tree
Showing 4 changed files with 35 additions and 35 deletions.
6 changes: 3 additions & 3 deletions examples/option_string_is_http_header.proto
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ message HttpHeader {
well_known_regex: KNOWN_REGEX_HTTP_HEADER_VALUE
// `strict` applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
// enable strict header validation. By default this value is true and
// validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3).
// validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3).
// When `strict` is false, validation only disallows `\r\n\0` characters.
strict: false
}];
Expand All @@ -37,5 +37,5 @@ message HttpHeader {
// | Name | Number | Description |
// |-------------------------------|--------|-------------------------------------------|
// | KNOWN_REGEX_UNSPECIFIED | 0 | |
// | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) |
// | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
// | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) |
// | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) |
8 changes: 4 additions & 4 deletions examples/option_string_match_pattern.proto
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ message UserProfile {
ignore: IGNORE_IF_UNPOPULATED
}];
// `hostname` specifies that the field value must be a valid hostname as defined
// by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5).
// by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5).
// Note: This constraint doesn't support internationalized domain names (IDNs).
string organization_domain = 4 [(buf.validate.field).string.hostname = true];
string personal_page = 5 [
// `uri` validates that a string field must be an absolute uri, as defined by
// [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
// [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3).
//
// Or use `uri_ref` to validate that it must be a relative or absolute URI, as
// defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
// defined by [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3).
// (buf.validate.field).string.uri_ref = true,
(buf.validate.field).string.uri = true,
(buf.validate.field).ignore = IGNORE_IF_UNPOPULATED
Expand All @@ -56,7 +56,7 @@ message UserProfile {
message HyperLink {
string text = 1;
// `address` specifies that the field value must be either a valid hostname
// as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
// as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5)
// (which doesn't support internationalized domain names or IDNs) or a valid
// IP (v4 or v6).
string address = 2 [(buf.validate.field).string.address = true];
Expand Down
28 changes: 14 additions & 14 deletions proto/protovalidate/buf/validate/validate.proto
Original file line number Diff line number Diff line change
Expand Up @@ -3276,7 +3276,7 @@ message StringRules {
// patterns
oneof well_known {
// `email` specifies that the field value must be a valid email address
// (addr-spec only) as defined by [RFC 5322](https://tools.ietf.org/html/rfc5322#section-3.4.1).
// (addr-spec only) as defined by [RFC 5322](https://datatracker.ietf.org/doc/html/rfc5322#section-3.4.1).
// If the field value isn't a valid email address, an error message will be generated.
//
// ```proto
Expand All @@ -3299,7 +3299,7 @@ message StringRules {
];

// `hostname` specifies that the field value must be a valid
// hostname as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5). This constraint doesn't support
// hostname as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5). This constraint doesn't support
// internationalized domain names (IDNs). If the field value isn't a
// valid hostname, an error message will be generated.
//
Expand Down Expand Up @@ -3393,7 +3393,7 @@ message StringRules {
];

// `uri` specifies that the field value must be a valid URI as defined by
// [RFC 3986](https://tools.ietf.org/html/rfc3986#section-3).
// [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-3).
//
// If the field value isn't a valid URI, an error message will be generated.
//
Expand All @@ -3417,10 +3417,10 @@ message StringRules {
];

// `uri_ref` specifies that the field value must be a valid URI Reference as
// defined by [RFC 3986](https://tools.ietf.org/html/rfc3986#section-4.1).
// defined by [RFC 3986](https://datatracker.ietf.org/doc/html/rfc3986#section-4.1).
//
// A URI Reference is either a [URI](https://tools.ietf.org/html/rfc3986#section-3),
// or a [Relative Reference](https://tools.ietf.org/html/rfc3986#section-4.2).
// A URI Reference is either a [URI](https://datatracker.ietf.org/doc/html/rfc3986#section-3),
// or a [Relative Reference](https://datatracker.ietf.org/doc/html/rfc3986#section-4.2).
//
// If the field value isn't a valid URI Reference, an error message will be
// generated.
Expand All @@ -3438,7 +3438,7 @@ message StringRules {
}];

// `address` specifies that the field value must be either a valid hostname
// as defined by [RFC 1034](https://tools.ietf.org/html/rfc1034#section-3.5)
// as defined by [RFC 1034](https://datatracker.ietf.org/doc/html/rfc1034#section-3.5)
// (which doesn't support internationalized domain names or IDNs) or a valid
// IP (v4 or v6). If the field value isn't a valid hostname or IP, an error
// message will be generated.
Expand All @@ -3463,7 +3463,7 @@ message StringRules {
];

// `uuid` specifies that the field value must be a valid UUID as defined by
// [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2). If the
// [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2). If the
// field value isn't a valid UUID, an error message will be generated.
//
// ```proto
Expand All @@ -3486,7 +3486,7 @@ message StringRules {
];

// `tuuid` (trimmed UUID) specifies that the field value must be a valid UUID as
// defined by [RFC 4122](https://tools.ietf.org/html/rfc4122#section-4.1.2) with all dashes
// defined by [RFC 4122](https://datatracker.ietf.org/doc/html/rfc4122#section-4.1.2) with all dashes
// omitted. If the field value isn't a valid UUID without dashes, an error message
// will be generated.
//
Expand Down Expand Up @@ -3688,8 +3688,8 @@ message StringRules {
// | Name | Number | Description |
// |-------------------------------|--------|-------------------------------------------|
// | KNOWN_REGEX_UNSPECIFIED | 0 | |
// | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2) |
// | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4) |
// | KNOWN_REGEX_HTTP_HEADER_NAME | 1 | HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2) |
// | KNOWN_REGEX_HTTP_HEADER_VALUE | 2 | HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4) |
KnownRegex well_known_regex = 24 [
(predefined).cel = {
id: "string.well_known_regex.header_name"
Expand Down Expand Up @@ -3717,7 +3717,7 @@ message StringRules {

// This applies to regexes `HTTP_HEADER_NAME` and `HTTP_HEADER_VALUE` to
// enable strict header validation. By default, this is true, and HTTP header
// validations are [RFC-compliant](https://tools.ietf.org/html/rfc7230#section-3). Setting to false will enable looser
// validations are [RFC-compliant](https://datatracker.ietf.org/doc/html/rfc7230#section-3). Setting to false will enable looser
// validations that only disallow `\r\n\0` characters, which can be used to
// bypass header matching rules.
//
Expand Down Expand Up @@ -3763,10 +3763,10 @@ message StringRules {
enum KnownRegex {
KNOWN_REGEX_UNSPECIFIED = 0;

// HTTP header name as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2).
// HTTP header name as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2).
KNOWN_REGEX_HTTP_HEADER_NAME = 1;

// HTTP header value as defined by [RFC 7230](https://tools.ietf.org/html/rfc7230#section-3.2.4).
// HTTP header value as defined by [RFC 7230](https://datatracker.ietf.org/doc/html/rfc7230#section-3.2.4).
KNOWN_REGEX_HTTP_HEADER_VALUE = 2;
}

Expand Down
28 changes: 14 additions & 14 deletions tools/internal/gen/buf/validate/validate.pb.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit c30dd1b

Please sign in to comment.