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
Introduce the StringifiedValues behavior. This behavior indicates that all primitive values of a class can be represented as strings in addition to their native type. This is for types where ES accepts both strings and native types and will return either a string or a native type (e.g. cat responses and settings). It generalizes the Stringified wrapper types to all fields of a class.
Motivation
In #2222 (comment) we've identified the need to express at the class level that for some classes all fields can be returned as strings (notably cat responses and all settings).
Using Stringified for all fields in these types is cumbersome and error-prone if we forget some, as seen in the above issue. So adding a class-level behavior that also follows inheritance rules will allow defining fields using their semantic value types and avoid omissions.
Notes
1 - This behavior should be added in 3 steps:
add the behavior type definition to the specification
create a team-wide issue to update code generators (for languages where it's relevant)
and then update the spec to use StringifiedValues
2 - Naming is hard. The name StringifiedValues has been chosen as it's consistent with the existing Stringified.
🚀 Feature Proposal
Introduce the
StringifiedValues
behavior. This behavior indicates that all primitive values of a class can be represented as strings in addition to their native type. This is for types where ES accepts both strings and native types and will return either a string or a native type (e.g. cat responses and settings). It generalizes theStringified
wrapper types to all fields of a class.Motivation
In #2222 (comment) we've identified the need to express at the class level that for some classes all fields can be returned as strings (notably
cat
responses and all settings).Using
Stringified
for all fields in these types is cumbersome and error-prone if we forget some, as seen in the above issue. So adding a class-level behavior that also follows inheritance rules will allow defining fields using their semantic value types and avoid omissions.Notes
1 - This behavior should be added in 3 steps:
2 - Naming is hard. The name
StringifiedValues
has been chosen as it's consistent with the existingStringified
.Example
IndexSettings
is a typical example (see current source).The text was updated successfully, but these errors were encountered: