{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://api.apigen.com/schemas/project.json",
  "title": "APIGen Project",
  "description": "An API generation project that groups related APIs, connectors, and configurations.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid",
      "description": "Unique identifier for the project."
    },
    "name": {
      "type": "string",
      "minLength": 1,
      "maxLength": 255,
      "description": "Human-readable name of the project."
    },
    "description": {
      "type": "string",
      "description": "Detailed description of the project purpose and scope."
    },
    "status": {
      "type": "string",
      "enum": ["active", "archived"],
      "description": "Current lifecycle status of the project."
    },
    "ownerId": {
      "type": "string",
      "format": "uuid",
      "description": "User ID of the project owner."
    },
    "settings": {
      "type": "object",
      "description": "Project-level settings and preferences.",
      "properties": {
        "defaultEnvironment": {
          "type": "string",
          "enum": ["development", "staging", "production"],
          "description": "Default deployment target environment."
        },
        "aiModel": {
          "type": "string",
          "description": "Preferred AI model for API generation tasks."
        },
        "autoGenerateTests": {
          "type": "boolean",
          "default": true,
          "description": "Whether to auto-generate tests when creating endpoints."
        },
        "autoGenerateDocs": {
          "type": "boolean",
          "default": true,
          "description": "Whether to auto-generate documentation."
        }
      },
      "additionalProperties": true
    },
    "tags": {
      "type": "array",
      "items": {
        "type": "string"
      },
      "description": "Tags for categorizing the project."
    },
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the project was created."
    },
    "updatedAt": {
      "type": "string",
      "format": "date-time",
      "description": "Timestamp when the project was last updated."
    }
  },
  "required": ["id", "name", "status", "ownerId", "createdAt", "updatedAt"],
  "additionalProperties": false
}
