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

Format attribute should not validate data instances that aren't the instance type to validate #756

Open
DannyvdSluijs opened this issue Oct 4, 2024 · 0 comments
Labels
Bug Good first issue A (simpeler) good first issue for new contributers PRs Welcome

Comments

@DannyvdSluijs
Copy link
Collaborator

DannyvdSluijs commented Oct 4, 2024

Our bowtie report shows that for Draft 3 and Draft 4 has some failing tests with regards to the format attribute.

Some example of these failing test case are:

  • Test: all string formats ignore integers
    • Case: email format
    • Case: ipv4 format
    • Case: ipv6 format

Draft 3 specification

From the spec we can read the following

7.1. Foreword
Structural validation alone may be insufficient to validate that an instance meets all the requirements of an application. The "format" keyword is defined to allow interoperable semantic validation for a fixed subset of values which are accurately described by authoritative resources, be they RFCs or other external specifications.

The value of this keyword is called a format attribute. It MUST be a string. A format attribute can generally only validate a given set of instance types. If the type of the instance to validate is not in this set, validation for this format attribute and instance SHOULD succeed.

@DannyvdSluijs DannyvdSluijs added PRs Welcome Good first issue A (simpeler) good first issue for new contributers Bug labels Oct 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Good first issue A (simpeler) good first issue for new contributers PRs Welcome
Projects
None yet
Development

No branches or pull requests

1 participant