{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/recal/json-schema/recal-organization-schema.json",
  "title": "Organization",
  "description": "Organization",
  "x-generated": "2026-11-10",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/recal-organization-api-openapi.yml#/components/schemas/Organization",
  "type": "object",
  "properties": {
    "createdAt": {
      "type": "string",
      "format": "date-time",
      "pattern": "^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))(T((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([,.]\\d+(?!:))?)?(\\17[0-5]\\d([,.]\\d+)?)?([Zz]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
    },
    "name": {
      "anyOf": [
        {
          "type": "string",
          "maxLength": 128,
          "minLength": 3
        },
        {
          "type": "null"
        }
      ]
    },
    "slug": {
      "type": "string",
      "pattern": "^[a-z0-9][a-z0-9_-]{2,127}$"
    },
    "members": {
      "type": "array",
      "items": {
        "$ref": "#/$defs/User"
      }
    }
  },
  "required": [
    "createdAt",
    "name",
    "slug"
  ],
  "$defs": {
    "User": {
      "type": "object",
      "description": "User",
      "properties": {
        "createdAt": {
          "type": "string",
          "format": "date-time",
          "pattern": "^([+-]?\\d{4}(?!\\d{2}\\b))((-?)((0[1-9]|1[0-2])(\\3([12]\\d|0[1-9]|3[01]))?|W([0-4]\\d|5[0-3])(-?[1-7])?|(00[1-9]|0[1-9]\\d|[12]\\d{2}|3([0-5]\\d|6[1-6])))(T((([01]\\d|2[0-3])((:?)[0-5]\\d)?|24:?00)([,.]\\d+(?!:))?)?(\\17[0-5]\\d([,.]\\d+)?)?([Zz]|([+-])([01]\\d|2[0-3]):?([0-5]\\d)?)?)?)?$"
        },
        "id": {
          "type": "string"
        }
      },
      "required": [
        "createdAt",
        "id"
      ]
    }
  }
}