Transform Grants item tree model to JSON and index in elastic
As a funder, I would like the metadata for my grants to be available via the REST API so that metadata consumers can retrieve data about my grants.
What
Grants metadata must be transformed from cayenne's item tree model into JSON that can be indexed in elastic. Those record can then be retrieved as JSON.
Example item tree EDN grant-example.edn
Corresponding JSON output grant-example.json
Definition of ready
-
Product owner: @ppolischuk1 -
Tech lead: @dtkaczyk -
Service:: label applied -
Definition of done updated -
Sample JSON output available: https://github.com/CrossRef/grantID-schema/blob/master/grantID.json -
Acceptance testing plan: staging -
Weight applied
Definition of done
-
Unit tests identified, implemented, and passing -
SONAR on merge request branch checked by tech lead -
SONAR on merge request branch checked by reviewer -
Code reviewed -
Available for acceptance testing via a staging URL, or otherwise -
Consider any impacts to current or future architecture/infrastructure, and update specifications and documentation as needed -
Knowledge base reviewed and updated -
Swagger documentation reviewed and updated -
Education curriculum reviewed and updated -
Acceptance criteria met -
JSON in API output conforms to the example output -
issued
date should be calculated as the earliest of the following dates: award-start date, project/award-start, and project/award-planned-start. -
In the funder metadata within grant metadata, the DOI is always implicitly asserted by funder. Cayenne should insert this info, it is not read from the XML. In API JSON output it should always be “publisher”. -
Field is-referenced-by-count
is missing in grants' API output JSON
-
-
Acceptance testing passed
Notes
Consider the API functionality included in other issues in this epic that will be built on top of the indexing rules. We should continuously sanity check indexing rules against all of the other specified behavior in subsequent issues to minimize having to retrace our steps.
Edited by Patrick Polischuk