Uploaded image for project: 'MariaDB Server'
  1. MariaDB Server
  2. MDEV-30124

Add format validation for JSON SCHEMA

    XMLWordPrintable

Details

    • New Feature
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • 11.6
    • JSON
    • 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)

      Attachments

        Activity

          People

            rucha174 Rucha Deodhar
            rucha174 Rucha Deodhar
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Git Integration

                Error rendering 'com.xiplink.jira.git.jira_git_plugin:git-issue-webpanel'. Please contact your Jira administrators.