{
  "$id": "https://curveballjs.org/schemas/a12nserver/group.json",
  "$schema": "https://json-schema.org/draft/2019-09/schema",
  "additionalProperties": false,
  "description": "A group can contain apps, users and other gruops and lets you assign privileges to all its members.",
  "properties": {
    "_links": {
      "description": "HAL Links"
    },
    "createdAt": {
      "description": "Creation date and time.",
      "format": "date-time",
      "type": "string"
    },
    "modifiedAt": {
      "description": "Last time the group was modified.",
      "format": "date-time",
      "type": "string"
    },
    "nickname": {
      "description": "Human-readable displayname.",
      "minLength": 3,
      "type": "string"
    },
    "privileges": {
      "additionalProperties": {
        "items": {
          "type": "string"
        },
        "type": "array"
      },
      "type": "object"
    },
    "type": {
      "const": "group",
      "description": "Ether 'user', 'app' or 'group'"
    }
  },
  "required": [
    "nickname",
    "active",
    "createdAt",
    "modifiedAt",
    "type",
    "privileges"
  ],
  "type": "object"
}