{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/rossdata-dev/json-schema/rossdata-dev-facility-detail-schema.json",
  "title": "FacilityDetail",
  "x-generated": "2026-11-23",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/rossdata-dev-openapi.json#/components/schemas/FacilityDetail",
  "type": "object",
  "properties": {
    "facility": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "description": {
      "type": [
        "string",
        "null"
      ]
    },
    "help": {
      "type": [
        "string",
        "null"
      ]
    },
    "system": {
      "type": "string"
    },
    "database": {
      "type": [
        "string",
        "null"
      ],
      "enum": [
        "FIN",
        "MAN"
      ]
    },
    "class": {
      "type": [
        "string",
        "null"
      ]
    },
    "program": {
      "type": [
        "string",
        "null"
      ]
    },
    "tag": {
      "type": [
        "string",
        "null"
      ]
    },
    "aliases": {
      "type": [
        "array",
        "null"
      ],
      "items": {
        "type": "string"
      }
    },
    "menuPaths": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "tables": {
      "type": "object",
      "properties": {
        "core": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FacilityTable"
          },
          "description": "Working-set tables"
        },
        "reference": {
          "type": "array",
          "items": {
            "$ref": "#/$defs/FacilityTable"
          },
          "description": "Control/lookup tables"
        }
      }
    }
  },
  "$defs": {
    "FacilityTable": {
      "type": "object",
      "properties": {
        "table": {
          "type": "string"
        },
        "accesses": {
          "type": "integer",
          "description": "Times the program source references this table"
        },
        "database": {
          "type": [
            "string",
            "null"
          ],
          "enum": [
            "FIN",
            "MAN"
          ]
        },
        "writes": {
          "type": "integer",
          "description": "Write hits (FIND…/LOCK=WRITE, ADD TO, DELETE FROM); 0 = read-only"
        },
        "url": {
          "type": "string",
          "format": "uri"
        }
      }
    }
  }
}