{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "github_extracted_details": {
            "type": "object",
            "description": "Details of Github inspection",
            "properties": {
                "forks_count": {
                    "type": "integer"
                },
                "last_year_commits": {
                    "$ref": "#/definitions/github_last_year_commits_details"
                },
                "open_issues_count": {
                    "type": "integer"
                },
                "stargazers_count": {
                    "type": "integer"
                },
                "subscribers_count": {
                    "type": "integer"
                },
                "updated_issues": {
                    "$ref": "#/definitions/github_issues_details"
                },
                "updated_pull_requests": {
                    "$ref": "#/definitions/github_pull_requests_details"
                }
            },
            "additionalProperties": false
        },
        "github_issue&prs_with_time_duration": {
            "type": "object",
            "description": "Details of Github issues + prs yearly or monthly or any given date-range",
            "properties": {
                "opened": {
                    "type": "integer"
                },
                "closed": {
                    "type": "integer"
                }
            },
            "required": [
                "opened",
                "closed"
            ],
            "additionalProperties": false
        },
        "github_issues_details": {
            "type": "object",
            "description": "Details of updated Github issues",
            "properties": {
                "year": {
                    "$ref": "#/definitions/github_issue&prs_with_time_duration"
                },
                "month": {
                    "$ref": "#/definitions/github_issue&prs_with_time_duration"
                }
            },
            "additionalProperties": false
        },
        "github_last_year_commits_details": {
            "type": "object",
            "description": "Details of last year Github commits",
            "properties": {
                "sum": {
                    "type": "integer"
                },
                "weekly": {
                    "type": "array",
                    "items": {
                        "type": "integer"
                    }
                }
            },
            "required": [
                "sum",
                "weekly"
            ],
            "additionalProperties": false
        },
        "github_pull_requests_details": {
            "type": "object",
            "description": "Details of updated Github pull requests",
            "properties": {
                "year": {
                    "$ref": "#/definitions/github_issue&prs_with_time_duration"
                },
                "month": {
                    "$ref": "#/definitions/github_issue&prs_with_time_duration"
                }
            },
            "additionalProperties": false
        }
    },
    "type": "object",
    "description": "Result of Github worker",
    "properties": {
        "schema": {
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name of the schema",
                    "pattern": "^[a-zA-Z0-9_]+$"
                },
                "version": {
                    "type": "string",
                    "description": "Version of the schema",
                    "pattern": "^[0-9]+-[0-9]+-[0-9]+$"
                },
                "url": {
                    "type": "string",
                    "description": "Full URL of the schema",
                    "format": "uri"
                }
            },
            "required": [
                "name",
                "version"
            ],
            "additionalProperties": false
        },
        "_release": {
            "type": "string",
            "description": "Unique release id in form of \"ecosystem:package:version\""
        },
        "status": {
            "type": "string",
            "enum": [
                "success",
                "error",
                "unknown"
            ]
        },
        "details": {
            "$ref": "#/definitions/github_extracted_details"
        },
        "summary": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "status",
        "details",
        "summary"
    ],
    "additionalProperties": false,
    "title": "github_details-v1-0-1"
}