-
-
Notifications
You must be signed in to change notification settings - Fork 51
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
Latest daft version 2020-12
is not supported
#158
Comments
Sorry that I cannot change the above format and pasted below
|
Yes, it does not support |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I tried to create the yup schema using the jsonschema
{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$ref": "#/$defs/Product", "$defs": { "Product": { "properties": { "id": { "type": "integer" }, "productType": { "type": "string", "enum": [ "Simple", "Configurable", "Grouped", "Virtual", "Bundle" ], "maxLength": 20, "minLength": 1, "title": "product type", "description": "product type", "default": "Simple", "examples": [ "Bundle", "Configurable" ] }, "product_date": { "type": "string", "format": "date-time", "message": { "required": "Product date is required", "type": "Correct format of Product Date Of Birth is yyyy-mm-ddTHH:MM:SSZ as 2006-01-02T15:04:05Z" } }, "productPrice": { "$ref": "#/$defs/ProductPrice" }, "tags": { "type": "object", "a": "b", "foo": [ "bar", "bar1" ] } }, "additionalProperties": false, "type": "object", "required": [ "id", "productType", "product_date", "productPrice" ] }, "ProductPrice": { "properties": { "regularPrice": { "type": "number" }, "markedPrice": { "type": "number" }, "discount": { "type": "integer" } }, "additionalProperties": false, "type": "object", "required": [ "regularPrice", "markedPrice" ] } } }
I validated the json schema here and it works good.
With schema-to-yup, I think it supports until draft-07 because I am getting an error
invalid schema: must be type: "object", was type: undefined
when trying to buildbuildYup(data, config)
using above json-schema.It will be helpful if you please confirm, if the draft was the issue or any other probable cause.
The text was updated successfully, but these errors were encountered: