We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello!
Trying to validate this json:
{ "attachments": [ { "mimetype": "image/jpeg", "content": "R0lGODlhGQAZAPMHAAAAAFpaWv+gAN+MNdDWDfj/AH1t+P///wAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAAZABkAAASKEMlJq7046wvA3oDgfVwoklUnrMGJIia7jmS8zgFqFzdA5B+b4LAa+GgYIYA4MBKQpZagsGwOCE9JAGjxFb6FQGEgzopz267322Frw2dLq9P+BjxScfhyJ4C3Jy0texkdUgIGRjcsGgFYAAYGAE0maRmCj5OUlo1bWz8BZFwvgAKcLxOnqKusrRsRADs=", "filename": "chili-pepper.jpg" } ], "inlines": [ { "mimetype": "image/jpeg", "filename": "chili-pepper-inline1.jpg" } ], "category": "wgnc:exclusive", "body_html": "<HTML><body><img src=\"cid:chili-pepper-inline1.jpg\"></body></HTML>", "text": "test_text", "subject": "Autotest subject" }
with this schema:
{ "description": "Email message", "type": "object", "properties": { "subject": { "type": "string", "minLength": 1, "pattern": "^[^\\r\\n\\t]+$" }, "text": { "type": "string", "minLength": 1 }, "html": { "type": "string", "minLength": 1 }, "from": { "type": "string", "minLength": 1 }, "attachments": { "type": "array", "items": { "type": "object", "required": [ "filename", "mimetype", "content" ], "properties": { "filename": { "type": "string", "minLength": 1, "maxLength": 256 }, "mimetype": { "type": "string", "minLength": 1, "maxLength": 256 }, "content": { "type": "string", "minLength": 1, "maxLength": 25000000, "pattern": "^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$" } } } }, "inlines": { "type": "array", "items": { "type": "object", "required": [ "filename", "mimetype", "content" ], "properties": { "filename": { "type": "string", "minLength": 1, "maxLength": 256 }, "mimetype": { "type": "string", "minLength": 1, "maxLength": 256 }, "content": { "type": "string", "minLength": 1, "maxLength": 25000000 } } } } }, "anyOf": [ { "required": [ "subject", "html" ] }, { "required": [ "subject", "text" ] } ] }
result is:
./_build/default/bin/jesse --json /Users/a_dziaineka/Repos/jesse/test_json/email_message.json -- /Users/a_dziaineka/Repos/jesse/test_json/test.json {"filename":"/Users/a_dziaineka/Repos/jesse/test_json/test.json","result":"ok"}
But online validator found error (link to the case):
Message: Required properties are missing from object: content. Schema path: #/properties/inlines/items/required
Is it a bug?
The text was updated successfully, but these errors were encountered:
Since you demand inlines to have a required field "content", it is correct to raise an error if the actual term you supply does not have a content.
Thus, this is not a bug in the validation.
Sorry, something went wrong.
@ThomasArts thank you!
If it is not validation bug then it is jesse bug?
Because jesse found no errors:
No branches or pull requests
Hello!
Trying to validate this json:
with this schema:
result is:
But online validator found error (link to the case):
Is it a bug?
The text was updated successfully, but these errors were encountered: