Replace webpub manifest parser with pydantic (PP-1367) #2163
+370
−2,107
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Replace our custom web manifest parser with Pydantic models.
I replace the validation we were doing via a patched json schema with the pydantic parser, since it gives better errors and more closely matches what we are expecting in Palace.
Edit: I broke this one into two PRs to make it a little easier to review. This PR actually implements the new models in our existing code, #2168 adds the models.
Motivation and Context
JIRA: PP-1367
Note: After this one goes in we should cut a new release of https://github.com/ThePalaceProject/webpub-manifest-parser and then mark it as archived, since we won't be using it anymore.
How Has This Been Tested?
Checklist