{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/codai-ro/json-schema/codai-ro-org-with-role-schema.json",
  "title": "Org",
  "description": "The stored org row (camelCase, as persisted) plus the caller's role.",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/codai-ro-orgs-sharing-api-openapi.yml#/components/schemas/OrgWithRole",
  "type": "object",
  "required": [
    "id",
    "name",
    "ownerUserId",
    "createdAt",
    "role"
  ],
  "properties": {
    "id": {
      "type": "string",
      "format": "uuid"
    },
    "name": {
      "type": "string"
    },
    "ownerUserId": {
      "type": "string",
      "format": "uuid"
    },
    "createdAt": {
      "type": "string",
      "format": "date-time"
    },
    "role": {
      "$ref": "#/$defs/OrgRole"
    }
  },
  "$defs": {
    "OrgRole": {
      "type": "string",
      "description": "Role inside an org.",
      "enum": [
        "owner",
        "admin",
        "member"
      ]
    }
  }
}