{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "Create Project",
  "description": "Create a new project. A project is the complete model of your application—its infrastructure, architecture, configurations, and environments.",
  "type": "object",
  "required": ["name", "id"],
  "properties": {
    "name": {
      "type": "string",
      "title": "Project Name",
      "description": "A human-readable name for the project",
      "minLength": 1,
      "examples": ["Rails Application", "Marketing Website", "Data Pipeline"]
    },
    "id": {
      "type": "string",
      "title": "Project ID",
      "description": "A short, memorable identifier for looking up this project in the API and CLI. This becomes the first segment of all resource identifiers within the project. For example, a project 'ecomm' with environment 'prod' and component 'db' creates the package identifier 'ecomm-prod-db'. Choose something concise and meaningful—human-readable, not a UUID. Max 20 characters, lowercase alphanumeric only (a-z, 0-9). Immutable after creation.",
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^[a-z0-9]{1,20}$",
      "examples": ["inventoryapi", "marketing", "dataeng"]
    },
    "description": {
      "type": "string",
      "title": "Project Description",
      "description": "An optional description of the project's purpose or contents",
      "maxLength": 255,
      "examples": ["Main customer-facing Rails application with PostgreSQL backend"]
    },
    "attributes": {
      "type": "object",
      "title": "Attributes",
      "description": "Key-value attributes for this project. Keys and values must be strings. Must conform to the organization's custom attributes for the project scope.",
      "additionalProperties": { "type": "string" },
      "default": {},
      "x-gql-type": "map"
    }
  }
}
