Closed pamfilos closed 8 years ago
We need to refactor how the JSON payload is provided. E.g. adding $schema
will not work for the Zenodo REST API. I think the best is that we can provide a callback which can "massage" the payload before sending it.
@drjova Any ideas for how best to solve it?
Additionally, since we're soon to release Zenodo, we probably need two branches (maint/master, master/next), so that we don't block each other.
Superseded by https://github.com/inveniosoftware/invenio-records-js/pull/24/commits/f0c65e254dd2a345c93388b828d98ef9f448c54c you can now add additional data to the payload by using the existing extra-params
attribute
<invenio-records
extra-params='{"headers": {"foo": "bar"}, "data": {"$schema": "foofoo"}}'
>
</invenio-records>
With that fix you it'll work exactly as it is on invenio-search-js
any Invenio app can have its own custom data
, headers
etc. :)
@drjova But I think the problem is as well that it's adding the {'metadata': ..}
key…..which is needed on zenodo but not analysis preservation
@lnielsen hmm we have it already there https://github.com/inveniosoftware/invenio-records-js/blob/master/src/invenio-records-js/controllers/InvenioRecordsCtrl.js#L187-L189 I'll make it configurable
Signed-off-by: Pamfilos Fokianos pamfilosf@gmail.com