@@ -27,10 +27,6 @@ interface Book {
2727
2828- Fields representing standardized concepts ** must** use the appropriate data
2929 type for the standard code (usually ` string ` ).
30- - Fields representing standardized concepts ** should not** use enums, even if
31- they only allow a small subset of possible values. Using enums in this
32- situation often leads to frustrating lookup tables when using multiple APIs
33- together.
3430 - Fields representing standardized concepts ** must** indicate which standard
3531 they follow, preferably with a link (either to the standard itself, the
3632 Wikipedia description, or something similar).
@@ -40,6 +36,12 @@ interface Book {
4036 case-insensitive unless this would introduce ambiguity (for example, accept
4137 both ` en-gb ` and ` en-GB ` ). When providing values to users, APIs ** should**
4238 use the canonical case (in the example above, ` en-GB ` ).
39+ - Standardized code fields ** may** have a default; if they do, the sentinel
40+ value ** must** be the omission of the field.
41+
42+ ** Note:** The string itself _ is_ the immutable, canonical code, used on the
43+ wire format. Services ** should not** create a separate enum with a different
44+ wire format, because doing so makes it difficult to use multiple APIs together.
4345
4446### Content types
4547
0 commit comments