Details
-
New Feature
-
Status: Open (View Workflow)
-
Major
-
Resolution: Unresolved
-
None
Description
Add validation for the "format" keyword in json schema.
Example:
SET @schema_email= '{ "format" : "email"}'; |
SELECT JSON_SCHEMA_VALID(@schema_email, ' "abc@gmail.com" '); Should return 1, |
SELECT JSON_SCHEMA_VALID(@schema_email, ' "abc" '); Should return 0. |
According to json schema standards validating the format keyword is not mandatory, but treating it as annotation is mandatory and if the implementation supports validation then it must be disabled by default (there should be a way to enable and disable it). The current implementation treats it as annotation only ( so treating it as validation is disabled by default too).
(https://json-schema.org/draft/2020-12/json-schema-validation.html#section-7.2)