{
    "description": "Formal JSON-Schema of PCN Spec",
    "properties": {
        "domains": {
            "additionalItems": false,
            "items": {
                "properties": {
                    "id": {
                        "type": "string"
                    },
                    "subtitle": {
                        "type": "string"
                    },
                    "title": {
                        "type": "string"
                    }
                },
                "required": [
                    "id",
                    "title",
                    "subtitle"
                ],
                "type": "object"
            },
            "type": "array"
        },
        "metadata": {
            "properties": {
                "author": {
                    "type": "string"
                },
                "description": {
                    "type": "string"
                },
                "title": {
                    "type": "string"
                }
            },
            "type": "object"
        },
        "steps": {
            "additionalItems": false,
            "items": {
                "properties": {
                    "domain": {
                        "properties": {
                            "id": {
                                "type": "string"
                            },
                            "region": {
                                "properties": {
                                    "type": {
                                        "enum": [
                                            "independent",
                                            "surrogate",
                                            "direct_leading",
                                            "direct_shared"
                                        ],
                                        "type": "string"
                                    },
                                    "with_domain": {
                                        "type": "string"
                                    }
                                },
                                "required": [
                                    "type",
                                    "with_domain"
                                ],
                                "type": "object"
                            }
                        },
                        "required": [
                            "id",
                            "region"
                        ],
                        "type": "object"
                    },
                    "emphasized": {
                        "default": false,
                        "type": "boolean"
                    },
                    "id": {
                        "type": "string"
                    },
                    "predecessors": {
                        "items": {
                            "properties": {
                                "id": {
                                    "type": "string"
                                },
                                "title": {
                                    "type": "string"
                                },
                                "type": {
                                    "enum": [
                                        "normal_relationship",
                                        "loose_temporal_relationship"
                                    ],
                                    "type": "string"
                                }
                            },
                            "required": [
                                "id",
                                "type"
                            ],
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "problems": {
                        "items": {
                            "properties": {
                                "description": {
                                    "type": "string"
                                },
                                "type": {
                                    "enum": [
                                        "inconvenient",
                                        "confusing",
                                        "difficult",
                                        "likely_to_fail"
                                    ],
                                    "type": "string"
                                }
                            },
                            "type": "object"
                        },
                        "type": "array"
                    },
                    "title": {
                        "type": "string"
                    },
                    "type": {
                        "enum": [
                            "process",
                            "decision",
                            "wait",
                            "divergent_process"
                        ]
                    },
                    "value_generic": {
                        "default": 0,
                        "type": "integer"
                    },
                    "value_specific": {
                        "default": 0,
                        "type": "integer"
                    }
                },
                "required": [
                    "id",
                    "title",
                    "type",
                    "domain"
                ],
                "type": "object"
            },
            "type": "array"
        }
    },
    "required": [
        "domains",
        "steps"
    ],
    "title": "PCN Spec",
    "type": "object"
}