You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: graph/patterns/enums.md
+5-5Lines changed: 5 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,22 +21,22 @@ In OData, enums represent a subset of the nominal type they rely on, and are esp
21
21
22
22
#### Enum or Booleans
23
23
24
-
Enumerations are a good alternative to Booleans when one of the two values (`true`, `false`) conveys other possible values not yet conceived. Let's assume we have an `Error` type and a property to communicate how to display it:
24
+
Enumerations are a good alternative to Booleans when one of the two values (`true`, `false`) conveys other possible values not yet conceived. Let's assume we have an `publicNotification` type and a property to communicate how to display it:
25
25
26
26
```xml
27
-
<ComplexTypeName="error">
27
+
<ComplexTypeName="publicNotification">
28
28
<PropertyName="title"Type="Edm.String" />
29
29
<PropertyName="message"Type="Edm.String" />
30
30
<PropertyName="displayAsTip"Type="Edm.Boolean" />
31
31
</ComplexType>
32
32
```
33
33
34
-
The `false` value here merely communicates that the error shall not be displayed as a tip. What if, in the future, the error could be displayed as a `tip` or `alert`, and then in a more distant future, a `dialog` option is viable?
34
+
The `false` value here merely communicates that the notification shall not be displayed as a tip. What if, in the future, the notification could be displayed as a `tip` or `alert`, and then in a more distant future, a `dialog` option is viable?
35
35
36
36
With the current model, the only way is to add more boolean properties to convey the new information:
0 commit comments