Closed candleindark closed 9 months ago
Attention: 9 lines
in your changes are missing coverage. Please review.
Comparison is base (
08d92c8
) 97.66% compared to head (8e24b33
) 91.57%.
Files | Patch % | Lines |
---|---|---|
dandischema/utils.py | 47.05% | 9 Missing :warning: |
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
As stated in https://github.com/dandi/dandi-archive/commit/b3db2310632782ccac935b3a680818fe765ae8e7#commitcomment-138536168, this PR is really not needed at all if the UI is able to construed the type of the value from the expression of the value in JSON.
This PR adds customization to the generation of JSON schema for the fields of Pydantic models that are of
Literal
type. Basically, this customization ensures that the JSON schema for aLiteral
field of a Pydantic model has atype
key.This customization revert change 3v entailed by Pydantic V2 listed in the top post of #203. Hopefully, it will also satisfy @satra's request at https://github.com/dandi/dandi-archive/commit/b3db2310632782ccac935b3a680818fe765ae8e7#commitcomment-138484018.