{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "linguist_details": {
            "type": "object",
            "description": "Details of Linguist run on one file",
            "properties": {
                "path": {
                    "type": "string"
                },
                "output": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/linguist_output"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "type": {
                    "type": "array",
                    "items": {
                        "type": "string"
                    }
                }
            },
            "required": [
                "path",
                "output",
                "type"
            ],
            "additionalProperties": false
        },
        "linguist_output": {
            "type": "object",
            "description": "Linguist output for one file",
            "properties": {
                "lines": {
                    "type": "integer"
                },
                "sloc": {
                    "type": "integer"
                },
                "type": {
                    "type": "string"
                },
                "language": {
                    "type": "string"
                },
                "mime": {
                    "type": "string"
                }
            },
            "required": [
                "lines",
                "sloc",
                "type",
                "language",
                "mime"
            ],
            "additionalProperties": false
        }
    },
    "type": "object",
    "description": "Result of Linguist 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"
            ]
        },
        "details": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/linguist_details"
            }
        },
        "summary": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "status",
        "details",
        "summary"
    ],
    "additionalProperties": false,
    "title": "languages-v1-0-0"
}