-
Notifications
You must be signed in to change notification settings - Fork 271
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
How to add user-defined artifact metadata? #720
Comments
Accidentally opened this half-way through creation. Reopening now :) |
This is something we were testing and it would help to have this feature. In our tests, only the 'description' was editable using the API and we would like to store information about the user who created the artifact. The field This part could be also better documented at the API level to understand what fields aren't editable. There are examples but not a complete list. |
Related issue: #361 |
I think this is a must-have and we just need to work out the details. In particular, it would be very good to start with a proposal regarding how to modify the core Registry API to support this feature. I'm very open to suggestions. I would add that there is some documentation about what fields can be modified here: https://studio-ws.apicur.io/sharing/76f236d3-1312-4548-a4d1-400487188c66#operation/updateArtifactMetaData There is definitely room for documentation improvement there. I'm open to suggested changes to make things clearer! Another question we'll need to address is whether users can search for artifacts based on these "additional properties". I would imagine the answer to that is "yes" since I can imagine that being a very powerful feature. In any case, this is a very important enhancement and there's no reason not to get started on it right away! :) |
This has been fixed here: #777 |
There may be metadata that users would like to have associated with an artifact stored in Apicurio that does not fit into any of the currently available metadata fields, which are:
name
(string)description
(string)labels
(array of strings)createdBy
(string)createdOn
(long)modifiedBy
(string)modifiedOn
(long)id
(string)version
(int)type
(ArtifactType)globalId
(long)state
(ArtifactState)It would be useful to have a metadata field that can contain more free-form user-definable information. The
labels
metadata field can hold a list of Strings, although these seem to be more akin to tags to be used for organization/searching and are displayed as such in the UI.In the Kubernetes world, resources have name-value pairs in the
metadata.labels
field, which is often used to hold additional information about the resource.Apicurio could add an extra metadata field for name-value pairs, perhaps named
properties
(or maybeadditionalProperties
? Naming is hard :) ) which would be defined as a JavaMap<String, String>
object. This would cover simple name-value pairs, although it wouldn't allow more complex structures.In addition to user-defined metadata, the
ibmcompat
API has fields in it's metadata objects that don't easily map to the Apicurio artifact metadata fields (such as the schemaname
(1) andstate.comment
fields (2)). Rather than adding those fields directly to the artifact metadata, aproperties
field could hold the information internally, and theibmcompat
API implementation could populate the additional fields using that data.I'd be interested to hear what people think about this, and happy to provide a PR if it's though to be a good idea.
(1)
apicurio-registry/app/src/main/java/io/apicurio/registry/ibmcompat/model/SchemaSummary.java
Lines 35 to 40 in b7f2f41
(2)
apicurio-registry/app/src/main/java/io/apicurio/registry/ibmcompat/model/SchemaState.java
Lines 72 to 77 in 64a78a7
The text was updated successfully, but these errors were encountered: