-
-
Notifications
You must be signed in to change notification settings - Fork 4
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
attention points while converting draft-04 to draft-07 #6
Comments
closes ajv-validator#6
I also had to convert |
And added |
that may be added
this changes validation result, so it should not be added. In JSON Schema "type" is optional, and schema without "type" simply allows non-objects. While it's often indicates a mistake that Ajv strict mode would catch, this is not something this tool should change - missing type can be intentional and completely valid. |
Hi,
I migrated the swagger v2.0 spec from draft04 to draft07 and although the tool helped a lot (thanks for that !) I ran into a few issues I thought I'd share so maybe other people can benefit.
The swagger 2.0 spec contained a number of refs to the draft04 schema itself,e.g:
I changed these by hand to:
It would be nice if the tool would support this.
( "positiveInteger" being replaced by "nonNegativeInteger" was quite easy to spot ;-))
The second one took me a bit more time to figure out:
into:
which resulted in an error that the parameter list could only have 1 item. Removing the square brackets around the object in "items" again solved this one.
Thanks again,
Hans
The text was updated successfully, but these errors were encountered: