{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://artifacts.apis.io/kicksma-sh/json-schema/kicksma-sh-group-schema.json",
  "title": "Group",
  "x-generated": "2026-11-13",
  "x-method": "derived",
  "x-generator": "derive-json-schema.py",
  "x-source": "openapi/kicksma-sh-openapi.json#/components/schemas/Group",
  "type": "object",
  "properties": {
    "code": {
      "type": "string"
    },
    "name": {
      "type": "string"
    },
    "url": {
      "type": "string"
    },
    "calendarUrl": {
      "type": "string"
    },
    "venue": {
      "type": "object"
    },
    "tz": {
      "type": "string"
    },
    "type": {
      "type": "string"
    },
    "capacity": {
      "type": "integer"
    },
    "level": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "min": {
          "type": [
            "number",
            "null"
          ]
        },
        "max": {
          "type": [
            "number",
            "null"
          ]
        },
        "preset": {
          "type": [
            "string",
            "null"
          ],
          "description": "bronze, silver, gold, platinum or custom"
        },
        "verifiedOnly": {
          "type": "boolean",
          "description": "Only levels confirmed by an organizer, a coach or the club walk in; declared levels inside the range ask to join."
        }
      }
    },
    "weekly": {
      "type": [
        "object",
        "null"
      ],
      "properties": {
        "weekday": {
          "type": "integer",
          "description": "0 = Sunday"
        },
        "time": {
          "type": "string"
        },
        "leadDays": {
          "type": "integer"
        }
      }
    },
    "askToJoin": {
      "type": "boolean",
      "description": "New people ask to join and an admin approves, on the group page. Off: anyone with the link joins."
    },
    "memberCount": {
      "type": "integer"
    },
    "members": {
      "type": "array",
      "description": "First names. A member's level is for the group's own members, so it is always null here.",
      "items": {
        "type": "object",
        "properties": {
          "name": {
            "type": "string"
          },
          "level": {
            "type": [
              "number",
              "null"
            ],
            "description": "Always null in public output."
          },
          "admin": {
            "type": "boolean"
          }
        }
      }
    },
    "upcoming": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "code": {
            "type": "string"
          },
          "url": {
            "type": "string"
          },
          "startsAt": {
            "type": "string"
          },
          "title": {
            "type": [
              "string",
              "null"
            ]
          },
          "category": {
            "type": [
              "string",
              "null"
            ],
            "enum": [
              "men",
              "women",
              "mixed",
              null
            ],
            "description": "Who the match is for; null for anyone. Information only: nobody is checked when they join."
          },
          "ageMin": {
            "type": [
              "integer",
              "null"
            ],
            "enum": [
              35,
              45,
              55,
              null
            ],
            "description": "An age tag, read as 35+, 45+ or 55+; null for any age. Information only."
          }
        }
      }
    }
  }
}