{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "definitions": {
        "details_metadata": {
            "type": "object",
            "description": "generic metadata dict in details list",
            "properties": {
                "author": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "bug_reporting": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "code_repository": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/metadata_code_repository"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "declared_license": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "dependencies": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "description": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "devel_dependencies": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "engines": {
                    "oneOf": [
                        {
                            "type": "object",
                            "additionalProperties": true
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "files": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "git_head": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "homepage": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "keywords": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "metadata": {
                    "oneOf": [
                        {
                            "type": "object",
                            "additionalProperties": true
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "name": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "platform": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "readme": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "scripts": {
                    "oneOf": [
                        {
                            "type": "object",
                            "additionalProperties": true
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "version": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "maintainers": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "contributors": {
                    "oneOf": [
                        {
                            "type": "array",
                            "items": {
                                "type": "string"
                            }
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "_tests_implemented": {
                    "type": "boolean"
                },
                "ecosystem": {
                    "type": "string"
                },
                "_dependency_tree_lock": {
                    "oneOf": [
                        {
                            "$ref": "#/definitions/metadata_lockfile"
                        },
                        {
                            "type": "null"
                        }
                    ]
                }
            },
            "additionalProperties": false
        },
        "metadata_code_repository": {
            "type": "object",
            "description": "Code repository description",
            "properties": {
                "type": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                }
            },
            "required": [
                "url"
            ],
            "additionalProperties": false
        },
        "metadata_locked_dependency": {
            "type": "object",
            "description": "Locked dependency description",
            "properties": {
                "name": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                },
                "specification": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "resolved": {
                    "oneOf": [
                        {
                            "type": "string"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "dependencies": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/metadata_locked_dependency"
                    }
                }
            },
            "additionalProperties": false
        },
        "metadata_lockfile": {
            "type": "object",
            "description": "Dependency lock file description",
            "properties": {
                "runtime": {
                    "type": "string"
                },
                "version": {
                    "type": "string"
                },
                "dependencies": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/metadata_locked_dependency"
                    }
                },
                "name": {
                    "type": "string"
                }
            },
            "additionalProperties": false
        }
    },
    "type": "object",
    "description": "Result of Mercator 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\""
        },
        "details": {
            "type": "array",
            "items": {
                "$ref": "#/definitions/details_metadata"
            }
        },
        "status": {
            "type": "string",
            "enum": [
                "success",
                "error"
            ]
        },
        "summary": {
            "type": "array",
            "items": {
                "type": "string"
            }
        }
    },
    "required": [
        "status",
        "summary"
    ],
    "additionalProperties": false,
    "title": "metadata-v3-1-0"
}