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

contrib vocabualries do not accept UI serialization schema #245

Open
2 tasks
zzacharo opened this issue Feb 8, 2023 · 0 comments
Open
2 tasks

contrib vocabualries do not accept UI serialization schema #245

zzacharo opened this issue Feb 8, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@zzacharo
Copy link
Member

zzacharo commented Feb 8, 2023

Case

In order to serialize vocabularies, for example in autocomplete dropdowns (deposit form, custom fields, etc.), they must accept the application/vnd.inveniordm.v1+json header. These response headers are configured in the resource config, for example, here.

This will serialize the record (i.e. vocabulary) including some key/value representations required by the UI. These is widely used across InvenioRDM. For example, the AutocompleteDropdown custom widget.

Contrib vocabularies on the other hand, are created using the RecordFactory, whose config does not include this response header. This is however configurable by the resource_cls_attrs parameter, see here.

Tasks

  • Configure the contrib resources config to accept the UI response header. One way of overwritting this can be seen in the names vocabulary.
  • Evaluate if the contrib vocabularies are serializable with the generic VocabularyL10NItemSchema. This means, if the correct key-values will exist. If not, a per-vocabulary schema has to be implemented.
@zzacharo zzacharo added the bug Something isn't working label Feb 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant