{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/apiKeyDetail.json",
    "type": "object",
    "title": "API key detail",
    "additionalProperties": false,
    "required": [
        "id",
        "description",
        "expiration",
        "createdAt",
        "createdBy"
    ],
    "properties": {
        "id": {
            "type": "integer",
            "minimum": 1,
            "title": "API key ID",
            "example": 1
        },
        "description": {
            "type": "string",
            "title": "API key description",
            "example": "My awesome app"
        },
        "expiration": {
            "type": [
                "string",
                "null"
            ],
            "format": "date-time",
            "title": "API key expiration",
            "example": null
        },
        "createdAt": {
            "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/common.json#/definitions/createdAt"
        },
        "createdBy": {
            "oneOf": [
                {
                    "$ref": "https://apidocs.iqrf.org/openapi/iqrf-gateway-webapp/latest/schemas/definitions/user.json#/definitions/brief"
                },
                {
                    "type": "null"
                }
            ]
        }
    }
}
