feat(proto): Add new field option to indicate a in id for subtypes
This allows for marking a field in a message as an id that can be used to determine the message's subtype. When creating some resources, an id from a related resource is used to indicate the resource's subtype, since the resource must have the same subtype as the related resource.
This commit is contained in:
1 parent
760b090567
commit
8cbbfbe3a0
2 files changed
+41
-18
No files matched your search
@@ -20,6 +20,10 @@ extend google.protobuf.FieldOptions {
|
||||
// of oneOf once and not for each option when generating the API
|
||||
// This will serve as a JSON key, used to transform that into the key the protobuf expects
|
||||
string subtype = 85555;
|
||||
|
||||
// subtype_source_id is used to indicate that a field provided an id that can be used
|
||||
// to determine the subtype of a message.
|
||||
bool subtype_source_id = 85556;
|
||||
}
|
||||
|
||||
extend google.protobuf.FileOptions {
|
||||
|
||||
Reference in new issue
Block a user