{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://uqp.dev/spec/v0.1/schemas/inference-rules.json",
  "title": "InferenceRules",
  "type": "object",
  "properties": {
    "pack_id": {
      "$ref": "common.json#/$defs/packId"
    },
    "pack_version": {
      "$ref": "common.json#/$defs/packVersion"
    },
    "provenance": {
      "type": "string",
      "minLength": 1
    },
    "rules": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "target_factor": {
            "type": "string",
            "minLength": 1
          },
          "output_value": {},
          "any": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object"
                }
              ]
            }
          },
          "all": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "string"
                },
                {
                  "type": "object"
                }
              ]
            }
          },
          "provenance": {
            "type": "string",
            "minLength": 1
          }
        },
        "required": [
          "id",
          "target_factor",
          "output_value"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "pack_id",
    "pack_version",
    "rules"
  ],
  "additionalProperties": false
}
