{
    "title": "forkJoin",
    "$schema": "http://json-schema.org/draft-04/schema#",
    "javaType": "com.sos.jobscheduler.model.instruction.ForkJoin",
    "type": "object",
    "required": [
        "branches"
    ],
    "extends": {
        "javaType": "com.sos.jobscheduler.model.instruction.Instruction",
        "type": "object",
        "required": [
            "TYPE"
        ],
        "properties": {
            "TYPE": {
                "javaType": "com.sos.jobscheduler.model.instruction.InstructionType",
                "type": "string",
                "enum": [
                    "Execute.Named",
                    "If",
                    "Try",
                    "Fork",
                    "Finish",
                    "Fail",
                    "Retry",
                    "Publish",
                    "Await"
                ]
            },
            "position": {
                "description": "Actually, each even item is a string, each odd item is an integer",
                "type": "array",
                "items": {
                    "anyOf": [
                        {
                            "type": "integer"
                        },
                        {
                            "type": "string"
                        }
                    ]
                }
            }
        },
        "additionalProperties": false
    },
    "description": "instruction with fixed property 'TYPE':'Fork'",
    "properties": {
        "branches": {
            "type": "array",
            "minItems": 2,
            "items": {
                "type": "object",
                "javaType": "com.sos.jobscheduler.model.workflow.Branch",
                "required": [
                    "id",
                    "workflow"
                ],
                "properties": {
                    "id": {
                        "type": "string",
                        "maxLength": 10,
                        "minLength": 1
                    },
                    "workflow": {
                        "type": "object",
                        "javaType": "com.sos.jobscheduler.model.instruction.Instructions",
                        "required": [
                            "instructions"
                        ],
                        "properties": {
                            "instructions": {
                                "type": "array",
                                "minItems": 1,
                                "items": {
                                    "javaType": "com.sos.jobscheduler.model.instruction.Instruction",
                                    "type": "object",
                                    "required": [
                                        "TYPE"
                                    ],
                                    "properties": {
                                        "TYPE": {
                                            "javaType": "com.sos.jobscheduler.model.instruction.InstructionType",
                                            "type": "string",
                                            "enum": [
                                                "Execute.Named",
                                                "If",
                                                "Try",
                                                "Fork",
                                                "Finish",
                                                "Fail",
                                                "Retry",
                                                "Publish",
                                                "Await"
                                            ]
                                        },
                                        "position": {
                                            "description": "Actually, each even item is a string, each odd item is an integer",
                                            "type": "array",
                                            "items": {
                                                "anyOf": [
                                                    {
                                                        "type": "integer"
                                                    },
                                                    {
                                                        "type": "string"
                                                    }
                                                ]
                                            }
                                        }
                                    },
                                    "additionalProperties": false
                                }
                            }
                        },
                        "additionalProperties": false
                    }
                },
                "additionalProperties": false
            }
        }
    },
    "additionalProperties": false
}