{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "$id": "https://www.schemastore.org/vespertide.json",
  "$defs": {
    "FileFormat": {
      "description": "Supported file formats for generated artifacts.",
      "type": "string",
      "enum": ["json", "yaml", "yml"]
    },
    "NameCase": {
      "description": "Supported naming cases.",
      "type": "string",
      "enum": ["snake", "camel", "pascal"]
    },
    "SeaOrmConfig": {
      "description": "SeaORM-specific export configuration.",
      "type": "object",
      "properties": {
        "extraEnumDerives": {
          "description": "Additional derive macros to add to generated enum types.\nDefault: `[\"vespera::Schema\"]`",
          "type": "array",
          "default": ["vespera::Schema"],
          "items": {
            "type": "string"
          }
        },
        "extraModelDerives": {
          "description": "Additional derive macros to add to generated entity model types.",
          "type": "array",
          "default": [],
          "items": {
            "type": "string"
          }
        }
      }
    }
  },
  "title": "VespertideConfig",
  "description": "Top-level vespertide configuration.",
  "type": "object",
  "properties": {
    "columnNamingCase": {
      "$ref": "#/$defs/NameCase"
    },
    "migrationFilenamePattern": {
      "type": "string",
      "default": "%04v_%m"
    },
    "migrationFormat": {
      "$ref": "#/$defs/FileFormat",
      "default": "json"
    },
    "migrationsDir": {
      "type": "string"
    },
    "modelExportDir": {
      "description": "Output directory for generated ORM models.",
      "type": "string",
      "default": "src/models"
    },
    "modelFormat": {
      "$ref": "#/$defs/FileFormat",
      "default": "json"
    },
    "modelsDir": {
      "type": "string"
    },
    "seaorm": {
      "$ref": "#/$defs/SeaOrmConfig",
      "description": "SeaORM-specific export configuration.",
      "default": {
        "extraEnumDerives": ["vespera::Schema"],
        "extraModelDerives": []
      }
    },
    "tableNamingCase": {
      "$ref": "#/$defs/NameCase"
    }
  },
  "required": [
    "modelsDir",
    "migrationsDir",
    "tableNamingCase",
    "columnNamingCase"
  ]
}
