{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "bundle://schemas/metabolic_model_ref.json",
  "title": "metabolic_model_ref@1 (regenerated by Genie; independent of gem card open fields)",
  "type": "object",
  "additionalProperties": false,
  "required": [
    "artifact_type",
    "sbml_ref",
    "card",
    "model_id",
    "genome_link",
    "gpr",
    "objective",
    "baseline"
  ],
  "properties": {
    "artifact_type": {
      "const": "metabolic_model_ref@1"
    },
    "sbml_ref": {
      "$ref": "bundle://meta/common.defs.json#/definitions/artifactRef"
    },
    "card": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "card_schema": {
          "enum": [
            "v2",
            "v3",
            "legacy_missing_schema",
            "unsupported_major"
          ]
        },
        "card_ref": {
          "$ref": "bundle://meta/common.defs.json#/definitions/artifactRef"
        }
      },
      "required": [
        "card_schema"
      ]
    },
    "model_id": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "genome_link": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "assembly": {
          "type": "string",
          "maxLength": 256
        },
        "strain": {
          "type": "string",
          "maxLength": 256
        },
        "genome_sha256": {
          "$ref": "bundle://meta/common.defs.json#/definitions/sha256Hex"
        },
        "match_status": {
          "enum": [
            "exact",
            "evidence_missing",
            "conflict",
            "unresolved"
          ]
        }
      },
      "required": [
        "match_status"
      ]
    },
    "gpr": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "coverage_pct": {
          "type": "number",
          "minimum": 0,
          "maximum": 100
        },
        "namespace": {
          "type": "string",
          "minLength": 1,
          "maxLength": 128
        },
        "crosswalk_status": {
          "enum": [
            "exact",
            "versioned_alias",
            "ambiguous",
            "unmapped"
          ]
        }
      },
      "required": [
        "coverage_pct",
        "namespace",
        "crosswalk_status"
      ]
    },
    "medium_ref": {
      "$ref": "bundle://meta/common.defs.json#/definitions/artifactRef"
    },
    "objective": {
      "type": "string",
      "minLength": 1,
      "maxLength": 256
    },
    "validation_claim": {
      "type": "string",
      "maxLength": 4096
    },
    "baseline": {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "feasible": {
          "type": "boolean"
        },
        "growth": {
          "type": "string",
          "x-decimal-string": true,
          "pattern": "^(0|-?(0\\.[0-9]*[1-9]|[1-9][0-9]*(\\.[0-9]*[1-9])?))$",
          "maxLength": 320
        },
        "solver": {
          "type": "object",
          "additionalProperties": false,
          "properties": {
            "id": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            },
            "version": {
              "type": "string",
              "minLength": 1,
              "maxLength": 64
            }
          },
          "required": [
            "id",
            "version"
          ]
        }
      },
      "required": [
        "feasible",
        "solver"
      ]
    }
  }
}
