Skip to content
Snippets Groups Projects
group.json 1.1 KiB
Newer Older
{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions":{
        "name": {
            "maxLength": 64,
            "minLength": 1,
            "pattern": "^[0-9A-Za-z][0-9A-Za-z .@_-]{0,30}[0-9A-Za-z]$",
            "title": "Name",
            "type": "string"
        },
        "group-input":{
          "type": "object",
          "properties": {
            "_id":{"$ref":"../definitions/string-id.json#"},
            "name":{"$ref":"#/definitions/name"}
          },
          "additionalProperties": false
        },
        "group-output":{
          "type": "object",
          "properties": {
            "_id":{"$ref":"../definitions/string-id.json#"},
            "name":{"$ref":"#/definitions/name"},
            "roles": {
              "type": "array",
              "items": {"$ref": "../definitions/permission.json#"},
              "uniqueItems": true
            },
            "created": {"$ref":"../definitions/created-modified.json#/definitions/created"},
            "modified": {"$ref":"../definitions/created-modified.json#/definitions/modified"}
          }
        }
    }
}