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

Add allPropertiesRequired and noAdditionalProperties options #494

Merged
merged 4 commits into from May 1, 2023

Conversation

a-lavis
Copy link
Contributor

@a-lavis a-lavis commented Apr 29, 2023

Adds the allPropertiesRequired and noAdditionalProperties options. Each of these options include a subset of the functionality that strict provides.

Here is how the three options interact, as a truth table:

strict allPropertiesRequired noAdditionalProperties All Properties are Required Additional Properties are not Permitted
T * * T T
F T T T T
F T F T F
F F T F T
F F F F F

These changes are not breaking - strict behaves the same way that it did previously.

@codecov
Copy link

codecov bot commented Apr 29, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +0.02 🎉

Comparison is base (f5071e1) 89.98% compared to head (dc25ffd) 90.00%.

❗ Current head dc25ffd differs from pull request most recent head 1b844b9. Consider uploading reports for the commit 1b844b9 to get more accurate results

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #494      +/-   ##
==========================================
+ Coverage   89.98%   90.00%   +0.02%     
==========================================
  Files          76       76              
  Lines        1577     1581       +4     
==========================================
+ Hits         1419     1423       +4     
  Misses        158      158              
Impacted Files Coverage Δ
lib/json-schema/attributes/properties.rb 100.00% <100.00%> (ø)
lib/json-schema/attributes/properties_v4.rb 100.00% <100.00%> (ø)
lib/json-schema/validator.rb 85.24% <100.00%> (+0.17%) ⬆️

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@a-lavis a-lavis marked this pull request as draft April 29, 2023 17:45
@a-lavis a-lavis marked this pull request as ready for review April 29, 2023 17:51
@a-lavis
Copy link
Contributor Author

a-lavis commented Apr 29, 2023

Rubocop is complaining that test/draft4_test.rb is too long - not sure what the best way to split up the class is. Any ideas?

Copy link
Member

@ekohl ekohl left a comment

Choose a reason for hiding this comment

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

I usually don't really care about the RuboCop Metrics, especially when it comes to tests.

@ekohl ekohl merged commit 1b801a3 into voxpupuli:master May 1, 2023
9 checks passed
@IlkhamGaysin IlkhamGaysin mentioned this pull request Sep 14, 2023
7 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants