Skip to content
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

Added conditional properties and required field assignment in uniforms-bridge-json-schema (closing #919). #936

Merged
merged 7 commits into from
Apr 22, 2021

Conversation

Monteth
Copy link
Member

@Monteth Monteth commented Apr 21, 2021

Fixed a bug where a field with no computed required subfields gets an empty 'required' prop. The same situation occurs with the 'properties'.

@Monteth Monteth requested a review from radekmie as a code owner April 21, 2021 11:18
@Monteth Monteth added the Type: Bug Bug reports and their fixes label Apr 21, 2021
@Monteth Monteth linked an issue Apr 21, 2021 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Apr 21, 2021

Codecov Report

Merging #936 (a767277) into master (6b1e3b2) will increase coverage by 0.03%.
The diff coverage is 95.45%.

❗ Current head a767277 differs from pull request most recent head c2a9f40. Consider uploading reports for the commit c2a9f40 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##           master     #936      +/-   ##
==========================================
+ Coverage   97.45%   97.48%   +0.03%     
==========================================
  Files         202      202              
  Lines        3924     3938      +14     
  Branches      804      809       +5     
==========================================
+ Hits         3824     3839      +15     
  Misses         11       11              
+ Partials       89       88       -1     
Impacted Files Coverage Δ
...niforms-bridge-json-schema/src/JSONSchemaBridge.ts 97.72% <90.00%> (+0.66%) ⬆️
packages/uniforms/src/joinName.ts 100.00% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 6b1e3b2...c2a9f40. Read the comment docs.

radekmie
radekmie previously approved these changes Apr 21, 2021
Copy link
Contributor

@radekmie radekmie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add tests, please.

Copy link
Contributor

@radekmie radekmie left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also, let's add one more test with non-object field with anyOf that is required.

@radekmie radekmie merged commit ea37655 into master Apr 22, 2021
@radekmie radekmie deleted the mth/004 branch April 22, 2021 11:18
@radekmie radekmie added this to the v3.4 milestone Apr 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Bug reports and their fixes
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

anyOf fields with empty required arrays are treated as required
2 participants