Skip to content

Commit 46f03a3

Browse files
authored
docs: change note annotation and reword the metadata docs (envoyproxy#39246)
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
1 parent a9962e5 commit 46f03a3

File tree

1 file changed

+17
-15
lines changed

1 file changed

+17
-15
lines changed

api/envoy/type/metadata/v3/metadata.proto

+17-15
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,10 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
1414

1515
// [#protodoc-title: Metadata]
1616

17-
// MetadataKey provides a general interface using ``key`` and ``path`` to retrieve value from
18-
// :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>`.
17+
// MetadataKey provides a way to retrieve values from
18+
// :ref:`Metadata <envoy_v3_api_msg_config.core.v3.Metadata>` using a ``key`` and a ``path``.
1919
//
20-
// For example, for the following Metadata:
20+
// For example, consider the following Metadata:
2121
//
2222
// .. code-block:: yaml
2323
//
@@ -28,7 +28,7 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
2828
// xyz:
2929
// hello: envoy
3030
//
31-
// The following MetadataKey will retrieve a string value "bar" from the Metadata.
31+
// The following MetadataKey would retrieve the string value "bar" from the Metadata:
3232
//
3333
// .. code-block:: yaml
3434
//
@@ -40,34 +40,36 @@ option (udpa.annotations.file_status).package_version_status = ACTIVE;
4040
message MetadataKey {
4141
option (udpa.annotations.versioning).previous_message_type = "envoy.type.metadata.v2.MetadataKey";
4242

43-
// Specifies the segment in a path to retrieve value from Metadata.
44-
// Currently it is only supported to specify the key, i.e. field name, as one segment of a path.
43+
// Specifies a segment in a path for retrieving values from Metadata.
44+
// Currently, only key-based segments (field names) are supported.
4545
message PathSegment {
4646
option (udpa.annotations.versioning).previous_message_type =
4747
"envoy.type.metadata.v2.MetadataKey.PathSegment";
4848

4949
oneof segment {
5050
option (validate.required) = true;
5151

52-
// If specified, use the key to retrieve the value in a Struct.
52+
// If specified, use this key to retrieve the value in a Struct.
5353
string key = 1 [(validate.rules).string = {min_len: 1}];
5454
}
5555
}
5656

57-
// The key name of Metadata to retrieve the Struct from the metadata.
58-
// Typically, it represents a builtin subsystem or custom extension.
57+
// The key name of the Metadata from which to retrieve the Struct.
58+
// This typically represents a builtin subsystem or custom extension.
5959
string key = 1 [(validate.rules).string = {min_len: 1}];
6060

61-
// The path to retrieve the Value from the Struct. It can be a prefix or a full path,
62-
// e.g. ``[prop, xyz]`` for a struct or ``[prop, foo]`` for a string in the example,
63-
// which depends on the particular scenario.
61+
// The path used to retrieve a specific Value from the Struct.
62+
// This can be either a prefix or a full path, depending on the use case.
63+
// For example, ``[prop, xyz]`` would retrieve a struct or ``[prop, foo]`` would retrieve a string
64+
// in the example above.
6465
//
65-
// Note: Due to that only the key type segment is supported, the path can not specify a list
66-
// unless the list is the last segment.
66+
// .. note::
67+
// Since only key-type segments are supported, a path cannot specify a list
68+
// unless the list is the last segment.
6769
repeated PathSegment path = 2 [(validate.rules).repeated = {min_items: 1}];
6870
}
6971

70-
// Describes what kind of metadata.
72+
// Describes different types of metadata sources.
7173
message MetadataKind {
7274
option (udpa.annotations.versioning).previous_message_type =
7375
"envoy.type.metadata.v2.MetadataKind";

0 commit comments

Comments
 (0)