Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow definition of concrete attribute type #1588

Open
4 tasks
SpicyLemon opened this issue Jun 13, 2023 · 0 comments
Open
4 tasks

Allow definition of concrete attribute type #1588

SpicyLemon opened this issue Jun 13, 2023 · 0 comments
Labels
attribute Attribute Module enhancement New feature or request good first issue Good for newcomers
Milestone

Comments

@SpicyLemon
Copy link
Contributor

SpicyLemon commented Jun 13, 2023

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 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
@SpicyLemon SpicyLemon added enhancement New feature or request good first issue Good for newcomers attribute Attribute Module labels Jun 13, 2023
@SpicyLemon SpicyLemon added this to the v1.17.0 milestone Jun 13, 2023
@SpicyLemon SpicyLemon modified the milestones: v1.17.0, v1.18.0 Sep 6, 2023
@iramiller iramiller modified the milestones: v1.18.0, v1.19.0 Jan 5, 2024
@SpicyLemon SpicyLemon modified the milestones: v1.19.0, v1.20.0 Jul 15, 2024
@iramiller iramiller modified the milestones: v1.20.0, v1.21.0 Sep 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
attribute Attribute Module enhancement New feature or request good first issue Good for newcomers
Projects
Development

No branches or pull requests

2 participants