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

Allow unknown formats #49

Open
tewe opened this issue Jan 24, 2019 · 3 comments
Open

Allow unknown formats #49

tewe opened this issue Jan 24, 2019 · 3 comments

Comments

@tewe
Copy link

tewe commented Jan 24, 2019

JSON Schema seems to allow {"type": "number", "format": "float"} but it causes this linter to fail. It would be nice if unknown formats could be ignored.

@nickcmaynard
Copy link
Owner

nickcmaynard commented Feb 23, 2019

@handrews
Copy link

@nickcmaynard format can apply to anything. The current standardized formats only apply to strings, but as you can see in individual format value subsections, each subsection notes that its values apply only to strings.

The format keyword itself can apply to any type. Specifically:

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.

Note that there is no restriction on which type or types to which a given format value applies.

@nickcmaynard nickcmaynard reopened this Feb 24, 2019
@nickcmaynard
Copy link
Owner

OK, thank you. Probably we need some sort of settings area with the ability to flip format validation on and off. Will leave this here until someone sends me a PR, or I have time.

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

No branches or pull requests

3 participants