Schema

evidence-profile.schema.json

Public QuantBayes validation schema.

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quantbayes.com/schemas/evidence-profile.schema.json",
  "title": "QuantBayes evidence profile",
  "description": "Schema for QuantBayes evidence profiles using SGA-QEM-1.0 failure-check semantics.",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "name",
    "profileUid",
    "version",
    "visibility",
    "domain",
    "standard",
    "standardVersion",
    "description",
    "scope",
    "maintainer",
    "rules"
  ],
  "properties": {
    "name": {
      "type": "string",
      "minLength": 1
    },
    "profileUid": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{2,95}$"
    },
    "version": {
      "type": "string",
      "pattern": "^[0-9]+\\.[0-9]+(\\.[0-9]+)?$"
    },
    "visibility": {
      "type": "string",
      "enum": [
        "community",
        "private"
      ]
    },
    "domain": {
      "type": "string",
      "pattern": "^[a-z][a-z0-9_]{1,31}$"
    },
    "standard": {
      "type": "string",
      "const": "SGA-QEM-1.0"
    },
    "standardVersion": {
      "type": "string",
      "const": "1.0"
    },
    "description": {
      "type": "string",
      "minLength": 1
    },
    "scope": {
      "type": "string",
      "minLength": 1
    },
    "maintainer": {
      "type": "string",
      "minLength": 1
    },
    "sourceUrl": {
      "type": "string",
      "format": "uri"
    },
    "rules": {
      "type": "array",
      "minItems": 1,
      "items": {
        "$ref": "#/$defs/rule"
      }
    }
  },
  "$defs": {
    "rule": {
      "type": "object",
      "additionalProperties": false,
      "required": [
        "ruleOrder",
        "ruleUid",
        "name",
        "description",
        "evidenceMeaning",
        "problemMeaning",
        "notAvailableMeaning"
      ],
      "properties": {
        "ruleOrder": {
          "type": "integer",
          "minimum": 1
        },
        "ruleUid": {
          "type": "string",
          "pattern": "^[a-z][a-z0-9_]{2,63}$"
        },
        "name": {
          "type": "string",
          "minLength": 1
        },
        "description": {
          "type": "string",
          "minLength": 1
        },
        "evidenceMeaning": {
          "type": "string",
          "minLength": 1,
          "description": "Meaning of FALSE under SGA-QEM-1.0. FALSE means evidence present."
        },
        "problemMeaning": {
          "type": "string",
          "minLength": 1,
          "description": "Meaning of TRUE under SGA-QEM-1.0. TRUE means problem found."
        },
        "notAvailableMeaning": {
          "type": "string",
          "minLength": 1,
          "description": "Meaning of NA under SGA-QEM-1.0. NA means not available."
        }
      }
    }
  }
}