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

Add metadata fields present in the JSON response to the XML response #2114

Merged
merged 5 commits into from
Jul 13, 2021

Conversation

DavisRayM
Copy link
Contributor

@DavisRayM DavisRayM commented Jul 1, 2021

Changes / Features implemented

  • Add non-list metadata fields to the XML attributes
  • Update test to ensure the attributes are present

Steps taken to verify this change does what is intended

Included tests

Side effects of implementing this change

N/A

Before submitting this PR for review, please make sure you have:

  • Included tests
  • Updated documentation

API Response Change

This PR makes changes to the API Responses expected on the data endpoint /api/v1/data/<id>.xml. The following is the new structure suggested in this PR:

<submission-batch>
  <submission-item submissionData="" dateCreated="" formVersion="" objectID="" ...>
    <data/>
    <linked-resources>
       <notes/>
       <tags/>
       <attachments />
     <linked-resources/>
   <submission-item/>
<submission-batch/>

Why the server-meta -> linked-resources change ? It made more sense to name the node linked-resources since it predominantly includes resources linked to the submission rather than metadata for the submission.

Closes #2107

@DavisRayM DavisRayM changed the title Add metadata fields present in the JSON response to the XML response [WIP] Add metadata fields present in the JSON response to the XML response Jul 1, 2021
@DavisRayM DavisRayM changed the title [WIP] Add metadata fields present in the JSON response to the XML response Add metadata fields present in the JSON response to the XML response Jul 2, 2021
denniswambua
denniswambua previously approved these changes Jul 5, 2021
@DavisRayM DavisRayM merged commit 472b466 into master Jul 13, 2021
@DavisRayM DavisRayM deleted the 2107-xml-metadata branch July 13, 2021 09:36
@DavisRayM DavisRayM mentioned this pull request Jul 27, 2021
1 task
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Metadata parity between the JSON and XForm data endpoints
2 participants