Skip to content

Commit 0b5124a

Browse files
author
yevhenii-nadtochii
committed
Clarify docs to TemplateString
1 parent 698ce0a commit 0b5124a

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

java-runtime/src/main/proto/spine/validate/error_message.proto

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,20 +48,23 @@ option java_package = "io.spine.validate";
4848
// After substitution, the final output would be:
4949
// "My dog's name is Fido."
5050
//
51-
// Each placeholder `key` should have a corresponding entry in `placeholder_value`.
51+
// Each placeholder `key` referenced in the template string must have a corresponding entry
52+
// in the `placeholder_value` map. However, the `placeholder_value` map is not restricted to
53+
// containing only the placeholders used in the template. Additional entries in the map
54+
// that do not correspond to placeholders in the template string are permitted.
5255
//
5356
message TemplateString {
5457

5558
// The template string that may contain one or more placeholders.
5659
string with_placeholders = 1;
5760

58-
// A map that provides values for each placeholder referenced in `with_placeholders`.
61+
// A map that provides values for placeholders referenced in `with_placeholders`.
5962
//
60-
// The keys in this map should match the placeholder keys inside `with_placeholders` without
61-
// the `${}` placeholder marker.
63+
// The keys in this map should match the placeholder keys inside `with_placeholders`
64+
// excluding the `${}` placeholder markers.
6265
//
63-
// All placeholders present in `with_placeholders` must have corresponding entries in this map,
64-
// otherwise the template is considered invalid.
66+
// All placeholders present in `with_placeholders` must have corresponding entries
67+
// in this map. Otherwise, the template is considered invalid.
6568
//
6669
map<string, string> placeholder_value = 2;
6770
}

0 commit comments

Comments
 (0)