IBM / jsonsubschema

Tool for checking whether a JSON schema is a subschema of another JSON schema.
Apache License 2.0
85 stars 17 forks source link

Fix couple of trivial cases for TOP schemas #16

Closed andrewhabib closed 1 year ago

andrewhabib commented 1 year ago

This PR fixes the follow-up issue mentioned in https://github.com/IBM/jsonsubschema/issues/14 by doing the following:

I have also added a couple of test cases that check for this specific case.

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.40% :tada:

Comparison is base (a94dd49) 76.56% compared to head (9083762) 76.96%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #16 +/- ## ========================================== + Coverage 76.56% 76.96% +0.40% ========================================== Files 8 8 Lines 1391 1398 +7 Branches 413 415 +2 ========================================== + Hits 1065 1076 +11 + Misses 232 230 -2 + Partials 94 92 -2 ``` | [Files Changed](https://app.codecov.io/gh/IBM/jsonsubschema/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM) | Coverage Δ | | |---|---|---| | [jsonsubschema/\_canonicalization.py](https://app.codecov.io/gh/IBM/jsonsubschema/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-anNvbnN1YnNjaGVtYS9fY2Fub25pY2FsaXphdGlvbi5weQ==) | `93.75% <100.00%> (+0.06%)` | :arrow_up: | | [jsonsubschema/\_checkers.py](https://app.codecov.io/gh/IBM/jsonsubschema/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-anNvbnN1YnNjaGVtYS9fY2hlY2tlcnMucHk=) | `71.86% <100.00%> (+0.30%)` | :arrow_up: | | [jsonsubschema/\_constants.py](https://app.codecov.io/gh/IBM/jsonsubschema/pull/16?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM#diff-anNvbnN1YnNjaGVtYS9fY29uc3RhbnRzLnB5) | `100.00% <100.00%> (ø)` | | ... and [1 file with indirect coverage changes](https://app.codecov.io/gh/IBM/jsonsubschema/pull/16/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=IBM)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.