{
    "$schema": "http://json-schema.org/draft-07/schema#",
    "$id": "#PR",
    "description": "A pull request.",
    "type": "object",
    "allOf": [
        {
            "$ref": "#RecordEntity"
        },
        {
            "properties": {
                "title": {
                    "description": "The title text of the PR.",
                    "type": "string"
                },
                "summary": {
                    "description": "The summary text of the PR.",
                    "type": "string"
                },
                "state": {
                    "description": "The state of the PR.",
                    "type": "string",
                    "examples": ["open", "merged", "declined", "superseded"]
                },
                "source": {
                    "description": "The source branch.",
                    "type": "string"
                },
                "target": {
                    "description": "The target/destination branch.",
                    "type": "string"
                },
                "repository": {
                    "description": "The name of the CodeRepo this PR belongs to.",
                    "type": "string"
                },
                "approved": {
                    "description": "Indicates if every commit associated with this PR has been approved by a reviewer other than the code author.",
                    "type": "boolean"
                },
                "validated": {
                    "description": "Indicates if every commit associated with this PR was submitted by a validated author known to the organization.",
                    "type": "boolean"
                }
            },
            "required": ["title", "state", "source", "target", "repository"]
        }
    ]
}
