From 21b4a6eb1028eeb404ad0227252613249e1f3d05 Mon Sep 17 00:00:00 2001 From: noahdietz Date: Fri, 21 Jul 2023 10:26:34 -0700 Subject: [PATCH] fix(AIP-203): disallow field_behavior in oneof --- aip/general/0203.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/aip/general/0203.md b/aip/general/0203.md index fc81d34f61..ea7efb5cda 100644 --- a/aip/general/0203.md +++ b/aip/general/0203.md @@ -25,7 +25,8 @@ RecognitionAudio audio = 2 [(google.api.field_behavior) = REQUIRED]; ``` - APIs **must** apply the `google.api.field_behavior` annotation on every field - on a message or sub-message used in a request. + on a message or sub-message used in a request, except for fields in a `oneof`. + - Fields within a `oneof` **must not** use `google.api.field_behavior`. - The annotation **must** include any [google.api.FieldBehavior][] values that accurately describe the behavior of the field. - `FIELD_BEHAVIOR_UNSPECIFIED` **must not** be used.