From b3f844b791cf0566c6bf21506187f62284b994bc Mon Sep 17 00:00:00 2001 From: Richard Frankel Date: Wed, 24 Jul 2024 15:55:24 -0700 Subject: [PATCH] View enums should be nested inside the resource. --- aep/general/0157/aep.md.j2 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/aep/general/0157/aep.md.j2 b/aep/general/0157/aep.md.j2 index df1d6831..56aa2ddd 100644 --- a/aep/general/0157/aep.md.j2 +++ b/aep/general/0157/aep.md.j2 @@ -52,9 +52,6 @@ enums are useful for situations where an API only wants to expose a small number of permutations to the user: - The enum **should** be specified as a `view` field on the request message. -- The enum **should** be named something ending in `-View` -- The enum **should** at minimum have values named `BASIC` and `FULL` (although - it **may** have values other than these). - The `UNSPECIFIED` value **must** be valid (not an error), and the API **must** document what the unspecified value will do. - For List methods, the effective default value **should** be `BASIC`. @@ -89,9 +86,11 @@ enum BookView { } ``` -- The enum **should** be defined at the top level of the proto file (as it is - likely to be needed in multiple requests, e.g. both `Get` and `List`). See - [enumerations](./enumerations) for more guidance on top-level enumerations. +- The enum **should** be defined within the resource; methods can reference it + as e.g. `Book.View`. +- The enum **should** be named something ending in `-View` +- The enum **should** at minimum have values named `BASIC` and `FULL` (although + it **may** have values other than these). {% tab oas %}