{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "type": "object",
  "properties": {
    "typescript": {
      "description": "Is project written in Typescript or not",
      "type": "boolean"
    },
    "exceptionHandlerNamespace": {
      "description": "Http server exception handler namespace",
      "type": "string"
    },
    "assetsDriver": {
      "description": "The driver to use for assets bundling",
      "type": "string",
      "enum": ["encore", "vite", "fake"]
    },
    "preloads": {
      "type": "array",
      "uniqueItems": true,
      "items": {
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "file": { "type": "string" },
              "environment": {
                "type": "array",
                "items": {
                  "type": "string",
                  "enum": ["web", "console", "test", "repl"]
                }
              },
              "optional": {
                "type": "boolean"
              }
            },
            "required": ["file"],
            "additionalProperties": false
          }
        ]
      }
    },
    "metaFiles": {
      "type": "array",
      "items": {
        "uniqueItems": true,
        "oneOf": [
          {
            "type": "string"
          },
          {
            "type": "object",
            "properties": {
              "pattern": { "type": "string" },
              "reloadServer": { "type": "boolean" }
            },
            "required": ["pattern"]
          }
        ]
      }
    },
    "commands": {
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "providers": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "aceProviders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "testProviders": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "uniqueItems": true
    },
    "directories": {
      "type": "object",
      "properties": {
        "config": {
          "type": "string"
        },
        "public": {
          "type": "string"
        },
        "contracts": {
          "type": "string"
        },
        "providers": {
          "type": "string"
        },
        "database": {
          "type": "string"
        },
        "migrations": {
          "type": "string"
        },
        "seeds": {
          "type": "string"
        },
        "resources": {
          "type": "string"
        },
        "views": {
          "type": "string"
        },
        "start": {
          "type": "string"
        },
        "tmp": {
          "type": "string"
        },
        "tests": {
          "type": "string"
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "commandsAliases": {
      "type": "object",
      "patternProperties": {
        "^.*$": {
          "type": "string"
        }
      }
    },
    "aliases": {
      "type": "object",
      "patternProperties": {
        "^.*$": {
          "type": "string"
        }
      }
    },
    "namespaces": {
      "type": "object",
      "properties": {
        "models": {
          "type": "string"
        },
        "exceptions": {
          "type": "string"
        },
        "middleware": {
          "type": "string"
        },
        "httpControllers": {
          "type": "string"
        },
        "eventListeners": {
          "type": "string"
        },
        "redisListeners": {
          "type": "string"
        },
        "validators": {
          "type": "string"
        }
      },
      "additionalProperties": {
        "type": "string"
      }
    },
    "tests": {
      "type": "object",
      "properties": {
        "suites": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "name": { "type": "string" },
              "files": {
                "oneOf": [
                  {
                    "type": "string"
                  },
                  {
                    "type": "array",
                    "items": {
                      "type": "string"
                    }
                  }
                ]
              },
              "timeout": {
                "type": "number"
              }
            },
            "required": ["name", "files"]
          }
        },
        "timeout": {
          "type": "number"
        },
        "forceExit": {
          "type": "boolean"
        }
      },
      "required": ["suites"]
    }
  },
  "required": ["typescript", "providers"]
}