feat: Add sidecar endpoint so UI can pass reference metadata updates to backend#217
Conversation
…rence-metadata-updates-to-backend
Codecov Report
@@ Coverage Diff @@
## main #217 +/- ##
==========================================
+ Coverage 70.94% 72.17% +1.22%
==========================================
Files 94 103 +9
Lines 4712 5099 +387
Branches 377 405 +28
==========================================
+ Hits 3343 3680 +337
- Misses 1352 1401 +49
- Partials 17 18 +1
... and 121 files with indirect coverage changes 📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
|
@cguedes one question on this and another thing to note:
For example, if we have the following Reference: and we want to update the $ poetry run python main.py update --data \
'{"source_filename": "abc.pdf", "patch": {"authors": [{"full_name": "Greg Reda"}, {"full_name": "Carlos Guedes"}]}}' |
|
For 1, I think it makes sense to interpret empty strings as null. I don't have any strong opinion on whether it is the frontend's job to send null instead of an empty string or if the backend should convert empty strings to null as you suggested. And for 2, I think it's actually easier for the frontend too to send the whole array of authors to the backend rather than keeping track of what indexes have been updated |
|
fixes #182