[MDEV-30124] Add format validation for JSON SCHEMA Created: 2022-11-29  Updated: 2023-12-22

Status: Open
Project: MariaDB Server
Component/s: JSON
Fix Version/s: 11.5

Type: New Feature Priority: Major
Reporter: Rucha Deodhar Assignee: Rucha Deodhar
Resolution: Unresolved Votes: 0
Labels: 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)


Generated at Thu Feb 08 10:13:50 UTC 2024 using Jira 8.20.16#820016-sha1:9d11dbea5f4be3d4cc21f03a88dd11d8c8687422.