{
    "title": "add post",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.joc.model.note.AddPost",
    "type": "object",
    "extends": {
        "javaType": "com.sos.joc.model.note.common.ModifyRequest",
        "type": "object",
        "extends": {
            "javaType": "com.sos.joc.model.note.common.NoteIdentifier",
            "type": "object",
            "required": [
                "name",
                "objectType"
            ],
            "properties": {
                "name": {
                    "type": "string",
                    "pattern": "^[^<>]*$",
                    "maxLength": 255,
                    "minLength": 1
                },
                "objectType": {
                    "javaType": "com.sos.joc.model.inventory.common.ConfigurationType",
                    "type": "string",
                    "enum": [
                        "WORKFLOW",
                        "JOBCLASS",
                        "JOBRESOURCE",
                        "LOCK",
                        "NOTICEBOARD",
                        "FILEORDERSOURCE",
                        "WORKINGDAYSCALENDAR",
                        "NONWORKINGDAYSCALENDAR",
                        "SCHEDULE",
                        "INCLUDESCRIPT",
                        "JOBTEMPLATE",
                        "REPORT"
                    ]
                }
            },
            "additionalProperties": false
        },
        "required": [
            "name",
            "objectType"
        ],
        "properties": {
            "auditLog": {
                "javaType": "com.sos.joc.model.audit.AuditParams",
                "type": "object",
                "properties": {
                    "comment": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    },
                    "timeSpent": {
                        "type": "integer",
                        "minimum": 0
                    },
                    "ticketLink": {
                        "type": "string",
                        "pattern": "^[^<>]*$",
                        "maxLength": 255
                    }
                }
            }
        },
        "additionalProperties": false
    },
    "required": [
        "name",
        "objectType",
        "content"
    ],
    "properties": {
        "content": {
            "type": "string",
            "pattern": "^(?s)((?!<script( |>)|<svg/on).)*$",
            "minLength": 1
        },
        "severity": {
            "javaType": "com.sos.joc.model.note.common.Severity",
            "type": "string",
            "enum": [
                "CRITICAL",
                "HIGH",
                "NORMAL",
                "LOW",
                "INFO"
            ],
            "default": "NORMAL"
        }
    },
    "additionalProperties": false
}