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
Allow the definition of the concrete attribute type e.g. for when the type is proto or json.
Problem Definition
As a writer of attributes, I want to be able to provide a type identifier (e.g. a type URL) when setting some attribute values that have type ATTRIBUTE_TYPE_JSON or ATTRIBUTE_TYPE_PROTO (or maybe others too), so that people reading the attributes know more about what the value is.
As a reader of attribute values, I want to be able to know more about the structure being represented in attributes of type ATTRIBUTE_TYPE_JSON and ATTRIBUTE_TYPE_PROTO (and maybe others too), so that I can more easily write code that uses attribute values.
Proposal
Add a new optional concrete_type string field to an attribute.
Allow the field to be used for any attribute_type, and it should never be required.
Limit the length to something reasonable that is unlikely to interfere (100? 150? 250?). Consider adding a param for the limit, but that might be overkill; a hardcoded number is probably fine.
An made up example of what the field is expected to hold: /figure.provenance.attributes.v1.KnowYourCustomer (that's 49 characters btw). There might be other, more verbose formats out there that people will want to use to identify the types, though. So maybe look around to see what all is done for that elsewhere to decide on a good length limit.
For Admin Use
Not duplicate issue
Appropriate labels applied
Appropriate contributors tagged
Contributor assigned/self-assigned
The text was updated successfully, but these errors were encountered:
Summary
Allow the definition of the concrete attribute type e.g. for when the type is proto or json.
Problem Definition
As a writer of attributes, I want to be able to provide a type identifier (e.g. a type URL) when setting some attribute values that have type
ATTRIBUTE_TYPE_JSON
orATTRIBUTE_TYPE_PROTO
(or maybe others too), so that people reading the attributes know more about what the value is.As a reader of attribute values, I want to be able to know more about the structure being represented in attributes of type
ATTRIBUTE_TYPE_JSON
andATTRIBUTE_TYPE_PROTO
(and maybe others too), so that I can more easily write code that uses attribute values.Proposal
Add a new optional
concrete_type
string field to an attribute.Allow the field to be used for any
attribute_type
, and it should never be required.Limit the length to something reasonable that is unlikely to interfere (100? 150? 250?). Consider adding a param for the limit, but that might be overkill; a hardcoded number is probably fine.
An made up example of what the field is expected to hold:
/figure.provenance.attributes.v1.KnowYourCustomer
(that's 49 characters btw). There might be other, more verbose formats out there that people will want to use to identify the types, though. So maybe look around to see what all is done for that elsewhere to decide on a good length limit.For Admin Use
The text was updated successfully, but these errors were encountered: