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

Align schema validation with specification for objects #205

Merged
merged 4 commits into from
May 13, 2022

Conversation

feenst
Copy link
Contributor

@feenst feenst commented Feb 23, 2022

Only an object should check for required properties based on the specification:

For each of these types, there are keywords that only apply to those types. For example, numeric types have a way of specifying a numeric range, that would not be applicable to other types.

See also comments in this issue.

Only an object should check for required properties.
@feenst feenst marked this pull request as ready for review February 23, 2022 19:49
@philsturgeon
Copy link
Member

I'll be happy to merge this ASAP if you can accompany it with a test.

Ensure validation isn't done on required keyword for data types other than object.
@feenst
Copy link
Contributor Author

feenst commented May 13, 2022

I'll be happy to merge this ASAP if you can accompany it with a test.

Test added

@coveralls
Copy link

Pull Request Test Coverage Report for Build 2320955039

  • -1 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 94.027%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/validators/spec.js 3 4 75.0%
Totals Coverage Status
Change from base Build 2320977531: 0%
Covered Lines: 265
Relevant Lines: 273

💛 - Coveralls

@coveralls
Copy link

coveralls commented May 13, 2022

Pull Request Test Coverage Report for Build 2320986666

  • 3 of 4 (75.0%) changed or added relevant lines in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage decreased (-0.5%) to 94.027%

Changes Missing Coverage Covered Lines Changed/Added Lines %
lib/validators/spec.js 3 4 75.0%
Totals Coverage Status
Change from base Build 2320977531: -0.5%
Covered Lines: 265
Relevant Lines: 273

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants