{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "User set",
    "type": "array",
    "items": {
        "title": "User",
        "type": "object",
        "properties": {
            "apiVersion": {
                "enum": [
                    "v1beta1",
                    "v1.0",
                    "v1"
                ]
            },
            "kind": {
                "enum": [
                    "User",
                    "user"
                ],
                "readOnly": true
            },
            "metadata": {
                "type": "object",
                "properties": {
                    "name": {
                        "type": "string",
                        "minLength": 3,
                        "maxLength": 30
                    },
                    "createdOn": {
                        "type": "string",
                        "readOnly": true
                    },
                    "modifiedOn": {
                        "type": "string",
                        "readOnly": true
                    },
                    "ref": {
                        "type": "string",
                        "readOnly": true,
                        "minLength": 3,
                        "maxLength": 24
                    }
                },
                "required": [
                    "name"
                ]
            },
            "spec": {
                "type": "object",
                "properties": {
                    "credentials": {
                        "type": "object",
                        "properties": {
                            "username": {
                                "type": "string",
                                "readOnly": true,
                                "minLength": 3,
                                "maxLength": 30
                            },
                            "secret": {
                                "type": "string",
                                "writeOnly": true
                            }
                        },
                        "required": [
                            "username",
                            "secret"
                        ]
                    }
                },
                "required": [
                    "credentials"
                ]
            }
        },
        "required": [
            "apiVersion",
            "kind",
            "spec",
            "metadata"
        ]
    }
}