{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "type"
    ],
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "apis",
          "database"
        ]
      },
      "apis": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "sql",
            "maps"
          ]
        }
      },
      "tables": {
        "type": "array",
        "additionalProperties": false,
        "items": {
          "type": "object",
          "required": [
            "schema",
            "name",
            "permissions"
          ],
          "properties": {
            "schema": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "permissions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "insert",
                  "select",
                  "update",
                  "delete"
                ]
              }
            }
          },
          "additionalProperties": false
        }
      }
    },
    "additionalProperties": false
  }
}

{
  "type": "array",
  "items": {
    "type": "object",
    "required": [
      "type"
    ],
    "additionalProperties": false,
    "properties": {
      "type": {
        "type": "string",
        "enum": [
          "apis",
          "database"
        ]
      },
      "apis": {
        "type": "array",
        "items": {
          "type": "string",
          "enum": [
            "sql",
            "maps"
          ]
        }
      },
      "tables": {
        "type": "array",
        "additionalProperties": false,
        "items": {
          "type": "object",
          "required": [
            "schema",
            "name",
            "permissions"
          ],
          "additionalProperties": false,
          "properties": {
            "schema": {
              "type": "string"
            },
            "name": {
              "type": "string"
            },
            "permissions": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "insert",
                  "select",
                  "update",
                  "delete"
                ]
              }
            }
          }
        }
      }
    }
  }
}

Reorder additional properties for readability
Reorder additional properties for readability
