-
Notifications
You must be signed in to change notification settings - Fork 2
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
Feature/add validation endpoint #39
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks fine to me, code is also easy to follow. Couple of things to note:
- endpoint now takes any amount of xml files and validates them. Maybe response should have "areValid" or either restrict its usage to handling only one xml file?
- I don't think adding that much inline comments is necessary, that validation part is quite clear now
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
small changes other than that LGTM
Co-authored-by: Stefan Negru <[email protected]>
…tadata-submitter into feature/add-validation-endpoint merges fixes made in remote and local repo
requested changes made |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just realized we need to do that len check also for get_object
, so someone could refactor it to_extract_xml_upload
in the future
regarding this PR, everything looks fine now! I'll test how the validation works from frontend at some point.
Description
PR includes an endpoint for XML validation that responds with a json object that includes boolean value for key "isValid" and a text string for the reason of failure if xml is invalid. Whether or not json response was required for this operation, I found responding with json to be substantially faster for whatever reason when xml was invalid against schema.
Related issues
Fixes #22
Type of change
Changes Made
Testing