You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Note that this code, that is used in Symfony, will only extract maxLength if Symfony is forces to guess the type of the validator. (using null as type in the builder). This would probably be a good PR to Symfony to fix this issue. So I guess the example of minLength is better than the example of maxLength.
JSON Schema keywords:
pattern
maxLength
minLength
multipleOf
maximum
minumum
additionalItems
maxItems
minItems
uniqueItems
maxProperties
minProperties
required
additionalProperties
dependencies
enum
type
allOf
oneOf
not
We could add our own validation keywords, but I think that this would be the minimum. It can also happen that some of these keywords don't make sense or cannot be extracted.
Hello! I'm dropping by from the JSON Schema specification project to let you know that the current draft is draft-07, which is a minor update of the more significant draft-06.
Note that implementations that do not support at least draft-06 will soon be moved to an "obsolete" or "older" section of the json-schema.org web site. Implementations supporting draft-06 or newer will remain prominently featured on the existing implementations page.
Since Liform is not a validator, "support" probably just means ensuring that you don't emit something incompatible with draft-06 (e.g. exclusiveMinimum and exclusiveMaximum changed from booleans to numbers, and id became $id). Since it doesn't look like you're using those keywords anyway, a note to the effect that the resulting schemas should work with recent drafts would probably be sufficient.
I see that you mention base64 data. Draft-07 adds contentEncoding and contentMediaType to support this (the feature was formerly in the Hyper-Schema spec as media).
This post was written in 2017, 2024 is just a few days away. What do you think about a 1.0 release this locks this library to the existing feature set, then a 2.0 that merges answears fork and updates all the dependencies, per #72 ?
This is the list of things that I would consider a must for v1.0
Validators
We can extract much information from validators. See this example of minLength and this code for guessing.
Note that this code, that is used in Symfony, will only extract maxLength if Symfony is forces to guess the type of the validator. (using
null
as type in the builder). This would probably be a good PR to Symfony to fix this issue. So I guess the example of minLength is better than the example of maxLength.JSON Schema keywords:
We could add our own validation keywords, but I think that this would be the minimum. It can also happen that some of these keywords don't make sense or cannot be extracted.
Other:
Document how to upload files. We already have an example in the Sandbox using Base64 for file uploading, but a doc section will prevent issues and questions.
Check i18n. I have not been paying much attention to i18n. It shouldn't be difficult to fix issues, but this needs to be checked.
The text was updated successfully, but these errors were encountered: