{
    "$schema": "http://json-schema.org/draft-04/schema#",
    "title": "Notice",
    "description": "A gazette notice",
    "type": "object",
    "properties": {
        "identifier": {
            "description": "The publisher's identifier for the notice, which may not be unique",
            "type": [
                "integer",
                "string"
            ]
        },
        "uid": {
            "description": "An internal, constructed, unique identifier, which may be the same as `identifier`",
            "type": "string"
        },
        "date_published": {
            "description": "The date of publication of the notice",
            "type": "string",
            "_format": "date"
        },
        "summary": {
            "description": "A brief summary of the notice's content",
            "type": "string"
        },
        "subjects": {
            "description": "The entities that the notice is primarily about",
            "type": "array",
            "items": {
                "$ref": "#/definitions/entity"
            }
        },
        "related_entities": {
            "description": "Other entities that the notice is about",
            "type": "array",
            "items": {
                "$ref": "#/definitions/entity"
            }
        },
        "about": {
            "description": "The content of the notice",
            "type": "object",
            "oneOf": [
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "creation of subjects"
                            ]
                        },
                        "classification": {
                            "description": "The type of creation",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "registration_date": {
                            "description": "The date of registration",
                            "type": "string",
                            "_format": "date"
                        },
                        "activity_start_date": {
                            "description": "The date on which activity started",
                            "type": "string",
                            "_format": "date"
                        },
                        "previous_owners": {
                            "description": "The previous owners of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "previous_operators": {
                            "description": "The previous operators of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "locations": {
                            "description": "Some locations of the subjects",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/location"
                            }
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "registration of locations"
                            ]
                        },
                        "classification": {
                            "description": "The type of registration",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "registration_date": {
                            "description": "The date on which the subjects are registered",
                            "type": "string",
                            "_format": "date"
                        },
                        "activity_start_date": {
                            "description": "The date on which activity started",
                            "type": "string",
                            "_format": "date"
                        },
                        "effective_date": {
                            "description": "The date from which the change is in effect",
                            "type": "string",
                            "_format": "date"
                        },
                        "previous_owners": {
                            "description": "The previous owners of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "previous_operators": {
                            "description": "The previous operators of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "locations": {
                            "description": "Some locations of the subjects",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/location"
                            }
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "sale of locations"
                            ]
                        },
                        "classification": {
                            "description": "The type of sale",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "registration_date": {
                            "description": "The date on which the subjects are registered",
                            "type": "string",
                            "_format": "date"
                        },
                        "activity_start_date": {
                            "description": "The date on which activity started",
                            "type": "string",
                            "_format": "date"
                        },
                        "effective_date": {
                            "description": "The date from which the change is in effect",
                            "type": "string",
                            "_format": "date"
                        },
                        "publication": {
                            "description": "Another publication in which the notice is published",
                            "type": "object",
                            "properties": {
                                "title": {
                                    "description": "The title of the publication",
                                    "type": "string"
                                },
                                "date_published": {
                                    "description": "The date of publication of the publication",
                                    "type": "string",
                                    "_format": "date"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "title",
                                "date_published"
                            ]
                        },
                        "opposition": {
                            "type": "string"
                        },
                        "statement_of_accounts": {
                            "type": "string"
                        },
                        "previous_owners": {
                            "description": "The previous owners of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "previous_operators": {
                            "description": "The previous operators of the locations",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        },
                        "locations": {
                            "description": "Some locations of the subjects",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/location"
                            }
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "judgment"
                            ]
                        },
                        "classification": {
                            "description": "The type of judgment",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "date": {
                            "description": "The date of the judgment",
                            "type": "string",
                            "_format": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "other"
                            ]
                        },
                        "classification": {
                            "description": "The type of judgment",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "title": {
                            "description": "The title of the notice",
                            "type": "string"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type",
                        "body"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "modification of subjects"
                            ]
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "activity_start_date": {
                            "description": "The date on which activity started",
                            "type": "string",
                            "_format": "date"
                        },
                        "effective_date": {
                            "description": "The date from which the change is in effect",
                            "type": "string",
                            "_format": "date"
                        },
                        "previous_operators": {
                            "description": "The previous operators of the location",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/entity"
                            }
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "striking off of subjects"
                            ]
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "activity_end_date": {
                            "description": "The date on which activity ended",
                            "type": "string",
                            "_format": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                },
                {
                    "properties": {
                        "type": {
                            "description": "The class of content",
                            "type": "string",
                            "enum": [
                                "filing"
                            ]
                        },
                        "classification": {
                            "description": "The type of filing",
                            "type": "array",
                            "items": {
                                "$ref": "#/definitions/classification"
                            }
                        },
                        "body": {
                            "description": "The unstructured prose content",
                            "$ref": "#/definitions/body"
                        },
                        "closing_date": {
                            "description": "The closing date of the filing",
                            "type": "string",
                            "_format": "date"
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "type"
                    ]
                }
            ]
        },
        "update_action": {
            "description": "If this notice corrects or cancels an earlier notice, a description of the update",
            "$ref": "#/definitions/update_action"
        },
        "issue": {
            "description": "The issue of the gazette in which the notice is published. An issue contains many notices.",
            "$ref": "#/definitions/issue"
        },
        "document": {
            "description": "The section of the issue in which the notice is published. An issue may be split into many documents, each containing many notices.",
            "$ref": "#/definitions/document"
        },
        "creator": {
            "description": "The entity authoring the notice, for example a notary authoring a notice for a dissolution",
            "$ref": "#/definitions/entity"
        },
        "publisher": {
            "description": "The publisher of the notice, for example a clerk entering the notice into the gazette",
            "$ref": "#/definitions/publisher"
        },
        "url": {
            "description": "The URL of the notice, at which a human may verify the data",
            "type": "string",
            "_format": "uri"
        },
        "media_type": {
            "description": "The media type of the URL resource",
            "type": "string"
        },
        "source_url": {
            "description": "The URL of the file from which the data was extracted by the scraper",
            "type": "string",
            "_format": "uri"
        },
        "sample_date": {
            "description": "A date on which the data is known to be true",
            "type": "string",
            "_format": "date"
        },
        "retrieved_at": {
            "description": "The time or date at which the source URL was requested",
            "type": "string",
            "_format": "date"
        },
        "confidence": {
            "description": "The scraper's author's confidence in the accuracy of the data",
            "type": "string",
            "enum": [
                "HIGH",
                "MEDIUM",
                "LOW"
            ]
        },
        "other_attributes": {
            "description": "Any other structured data from the notice",
            "type": "object"
        }
    },
    "additionalProperties": false,
    "required": [
        "issue",
        "uid",
        "source_url",
        "sample_date",
        "confidence"
    ],
    "definitions": {
        "address": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "oneOf": [
                {
                    "type": [
                        "string",
                        "null"
                    ],
                    "minLength": 2
                },
                {
                    "name": "Address",
                    "description": "An address object",
                    "type": "object",
                    "properties": {
                        "street_address": {
                            "type": "string"
                        },
                        "locality": {
                            "type": "string"
                        },
                        "region": {
                            "type": "string"
                        },
                        "postal_code": {
                            "type": "string"
                        },
                        "country": {
                            "type": "string"
                        },
                        "country_code": {
                            "description": "ISO 3166-2 code for country",
                            "type": "string"
                        }
                    },
                    "anyOf": [
                        {
                            "required": [
                                "street_address"
                            ]
                        },
                        {
                            "required": [
                                "postal_code"
                            ]
                        },
                        {
                            "required": [
                                "locality",
                                "country"
                            ]
                        }
                    ]
                }
            ]
        },
        "issue": {
            "title": "Issue",
            "description": "An issue of a gazette",
            "type": "object",
            "properties": {
                "publication": {
                    "description": "The gazette of which the issue is a part",
                    "$ref": "#/definitions/publication"
                },
                "identifier": {
                    "description": "The identifier of the issue",
                    "type": [
                        "string",
                        "integer"
                    ]
                },
                "title": {
                    "description": "The title of the issue",
                    "type": "string"
                },
                "edition_id": {
                    "description": "The identifier of the edition of which the issue is a part",
                    "type": [
                        "string",
                        "integer"
                    ]
                },
                "page_range": {
                    "description": "The page range of the issue within the edition",
                    "type": "string",
                    "pattern": "^[0-9]*(-[0-9]*)?$"
                },
                "url": {
                    "description": "The URL of the issue",
                    "type": "string",
                    "_format": "uri"
                },
                "media_type": {
                    "description": "The media type of the URL resource",
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "publication"
            ]
        },
        "publication": {
            "title": "Publication",
            "description": "A gazette",
            "type": "object",
            "properties": {
                "publisher": {
                    "description": "The publisher of the gazette",
                    "$ref": "#/definitions/publisher"
                },
                "jurisdiction_code": {
                    "description": "The jurisdiction covered by the gazette",
                    "type": "string"
                },
                "title": {
                    "description": "The title of the gazette",
                    "type": "string"
                },
                "url": {
                    "description": "The URL of the gazette",
                    "type": "string",
                    "_format": "uri"
                },
                "media_type": {
                    "description": "The media type of the URL resource",
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "publisher"
            ]
        },
        "publisher": {
            "title": "Publisher",
            "description": "A gazette publisher",
            "type": "object",
            "properties": {
                "name": {
                    "description": "The name of the publisher",
                    "type": "string"
                },
                "identifier": {
                    "description": "The identifier of the publisher",
                    "type": [
                        "integer",
                        "string"
                    ]
                },
                "url": {
                    "description": "The URL of the publisher",
                    "type": "string",
                    "_format": "uri"
                },
                "media_type": {
                    "description": "The media type of the URL resource",
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "name"
            ]
        },
        "document": {
            "title": "Document",
            "description": "A section of an issue",
            "type": "object",
            "properties": {
                "page_range": {
                    "description": "The page range of the document within the issue",
                    "type": "string",
                    "pattern": "^[0-9]*(-[0-9]*)?$"
                },
                "url": {
                    "description": "The URL of the document",
                    "type": "string",
                    "_format": "uri"
                },
                "media_type": {
                    "description": "The media type of the URL resource",
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "required": [
                "url"
            ]
        },
        "location": {
            "title": "Location",
            "description": "A business location",
            "type": "object",
            "properties": {
                "type": {
                    "description": "The type of location",
                    "type": "string",
                    "enum": [
                        "primary",
                        "secondary",
                        "other"
                    ]
                },
                "name": {
                    "description": "The name of the location",
                    "type": "string"
                },
                "activity": {
                    "description": "The business activity at the location",
                    "type": "string"
                },
                "address": {
                    "description": "The address of the location",
                    "$ref": "#/definitions/address"
                },
                "origin": {
                    "description": "The origin of the location as an asset",
                    "type": "string"
                }
            },
            "additionalProperties": false
        },
        "body": {
            "title": "Body",
            "description": "Content",
            "type": "object",
            "properties": {
                "value": {
                    "description": "The content",
                    "type": "string"
                },
                "media_type": {
                    "description": "The media type of the content",
                    "type": "string",
                    "enum": [
                        "application/pdf",
                        "application/xml",
                        "text/plain",
                        "text/html"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "value"
            ]
        },
        "update_action": {
            "title": "Update action",
            "description": "An act of changing an object",
            "type": "object",
            "properties": {
                "type": {
                    "description": "The type of change",
                    "type": "string",
                    "enum": [
                        "cancellation",
                        "correction"
                    ]
                },
                "object": {
                    "description": "The object that was changed",
                    "type": "object",
                    "properties": {
                        "identifier": {
                            "description": "The publisher's identifier for the notice, which may not be unique",
                            "type": [
                                "integer",
                                "string"
                            ]
                        },
                        "date_published": {
                            "description": "The date of publication of the notice",
                            "type": "string",
                            "_format": "date"
                        },
                        "issue": {
                            "description": "The issue of the gazette in which the notice is published. An issue contains many notices.",
                            "type": "object",
                            "properties": {
                                "identifier": {
                                    "description": "The identifier of the issue",
                                    "type": [
                                        "string",
                                        "integer"
                                    ]
                                },
                                "edition_id": {
                                    "description": "The identifier of the edition of which the issue is a part",
                                    "type": [
                                        "string",
                                        "integer"
                                    ]
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "identifier"
                            ]
                        }
                    },
                    "additionalProperties": false,
                    "required": [
                        "issue",
                        "identifier"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "object"
            ]
        },
        "entity": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "required": [
                "entity_type",
                "entity_properties"
            ],
            "oneOf": [
                {
                    "properties": {
                        "entity_type": {
                            "enum": [
                                "company"
                            ]
                        },
                        "entity_properties": {
                            "$ref": "#/definitions/company-for-nesting"
                        }
                    }
                },
                {
                    "properties": {
                        "entity_type": {
                            "enum": [
                                "person"
                            ]
                        },
                        "entity_properties": {
                            "$ref": "#/definitions/person"
                        }
                    }
                },
                {
                    "properties": {
                        "entity_type": {
                            "enum": [
                                "organisation"
                            ]
                        },
                        "entity_properties": {
                            "$ref": "#/definitions/organisation"
                        }
                    }
                },
                {
                    "properties": {
                        "entity_type": {
                            "enum": [
                                "unknown"
                            ]
                        },
                        "entity_properties": {
                            "$ref": "#/definitions/unknown-entity-type"
                        }
                    }
                }
            ]
        },
        "company-for-nesting": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "A company in OpenCorporates",
            "type": "object",
            "properties": {
                "company_number": {
                    "type": "string",
                    "description": "unique identifier given by the corporate register with which it is incorporated",
                    "minLength": 1
                },
                "name": {
                    "type": "string",
                    "description": "Legal name of the company",
                    "minLength": 1
                },
                "jurisdiction": {
                    "type": "string",
                    "description": "A free text field for the jurisdiction where the company is registered \u2013 this can be either the ISO 3166-2 code, the underscored version, or the standard name for the jurisdiction, e.g. France"
                },
                "jurisdiction_code": {
                    "type": "string",
                    "description": "Code representing the jurisdiction/company register which is the canonical record of the company\u2019s existence. Uses underscored ISO 3166-2 to represent it, e.g. es for Spain, us_de for Delaware",
                    "minLength": 2,
                    "maxLength": 5
                },
                "incorporation_date": {
                    "type": "string",
                    "_format": "date"
                },
                "dissolution_date": {
                    "type": "string",
                    "_format": "date"
                },
                "retrieved_at": {
                    "type": "string",
                    "_format": "date"
                },
                "current_status": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "company_type": {
                    "type": [
                        "string",
                        "null"
                    ]
                },
                "registry_url": {
                    "type": "string"
                },
                "website": {
                    "oneOf": [
                        {
                            "type": "string",
                            "minLength": 5
                        },
                        {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string",
                                "minLength": 5
                            }
                        }
                    ]
                },
                "telephone_number": {
                    "type": "string",
                    "minLength": 4
                },
                "fax_number": {
                    "type": "string",
                    "minLength": 4
                },
                "registered_address": {
                    "$ref": "#/definitions/address"
                },
                "headquarters_address": {
                    "$ref": "#/definitions/address"
                },
                "mailing_address": {
                    "$ref": "#/definitions/address"
                },
                "addresses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/address-with-type"
                    }
                },
                "officers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/officer"
                    }
                },
                "share_parcels": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/share-parcel"
                    }
                },
                "total_shares": {
                    "$ref": "#/definitions/total-shares"
                },
                "filings": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/filing"
                    }
                },
                "identifiers": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/identifier"
                    }
                },
                "industry_codes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/industry-code"
                    }
                },
                "previous_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/previous-name"
                    }
                },
                "alternative_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/alternative-name"
                    }
                },
                "branch": {
                    "type": [
                        "string",
                        "null"
                    ],
                    "description": "A flag to denote whether a company is a branch entity. This should only be set if the company is a type of branch (otherwise should be null). In general the only option here is 'F' for a 'Foreign' branch, i.e. an out-of-jurisdiction entity that has registered as having a presence in the jurisdiction. In the US this is sometimes called a Foreign Corporation",
                    "enum": [
                        "F",
                        "L",
                        null
                    ]
                },
                "all_attributes": {
                    "type": "object",
                    "description": "Other arbitrary attributes for a given company",
                    "properties": {
                        "jurisdiction_of_origin": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "description": "The jurisdiction of the 'home' company if this is a branch",
                            "minLength": 1
                        },
                        "home_company_number": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "description": "If the entity is a 'branch', this is the company_number of the 'home' company in the home company's jurisdiction",
                            "minLength": 1
                        },
                        "home_legal_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "description": "The legal name of the 'home' company in its jurisdiction if this is a branch, and the name is different from the legal name of the branch",
                            "minLength": 1
                        },
                        "registered_agent_address": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "description": "The address of the 'Agent', a public address to which legal papers can be served",
                            "minLength": 1
                        },
                        "registered_agent_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "description": "The 'Agent' of the company \u2013 a person or entity that is empowered to accept service for the company",
                            "minLength": 1
                        },
                        "number_of_employees": {
                            "anyOf": [
                                {
                                    "type": "string",
                                    "minLength": 1
                                },
                                {
                                    "type": "number",
                                    "minimum": 0
                                }
                            ],
                            "description": "The number of employees"
                        },
                        "merged_into": {
                            "type": "object",
                            "description": "Information on the merger of this company into a 'survivor' company",
                            "properties": {
                                "surviving_company": {
                                    "type": [
                                        "object"
                                    ],
                                    "description": "the surviving_company that this has been merged into",
                                    "properties": {
                                        "name": {
                                            "type": "string",
                                            "description": "The legal name of the surviving company",
                                            "minLength": 1
                                        },
                                        "company_number": {
                                            "type": "string",
                                            "description": "The company_number of the surviving company, if known",
                                            "minLength": 1
                                        },
                                        "jurisdiction": {
                                            "type": "string",
                                            "description": "The jurisdiction of incorporation of the surviving company",
                                            "minLength": 2
                                        }
                                    },
                                    "anyOf": [
                                        {
                                            "required": [
                                                "name"
                                            ]
                                        },
                                        {
                                            "required": [
                                                "company_number"
                                            ]
                                        }
                                    ]
                                },
                                "effective_date": {
                                    "description": "The date of the merger",
                                    "type": "string",
                                    "_format": "date"
                                }
                            },
                            "additionalProperties": false,
                            "required": [
                                "surviving_company"
                            ]
                        }
                    }
                }
            },
            "additionalProperties": false,
            "anyOf": [
                {
                    "required": [
                        "name"
                    ]
                },
                {
                    "required": [
                        "company_number"
                    ]
                }
            ]
        },
        "address-with-type": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An address with a type",
            "type": "object",
            "properties": {
                "address": {
                    "$ref": "#/definitions/address"
                },
                "type": {
                    "enum": [
                        "registered",
                        "headquarters",
                        "mailing",
                        "trading",
                        "unknown"
                    ]
                }
            },
            "additionalProperties": false,
            "required": [
                "address",
                "type"
            ]
        },
        "officer": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An officer (director, senior executive) of a company",
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "minLength": 1,
                    "not": {
                        "pattern": "^[\\.\\,\\*\\\\\\-\\s\\{\\}\\(\\)]+$"
                    }
                },
                "start_date": {
                    "anyOf": [
                        {
                            "type": "string",
                            "_format": "date"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "end_date": {
                    "anyOf": [
                        {
                            "type": "string",
                            "_format": "date"
                        },
                        {
                            "type": "null"
                        }
                    ]
                },
                "position": {
                    "type": "string"
                },
                "uid": {
                    "type": "string",
                    "description": "a unique identifier given to the officership"
                },
                "other_attributes": {
                    "type": "object",
                    "properties": {
                        "date_of_birth": {
                            "type": "string",
                            "_format": "date"
                        },
                        "nationality": {
                            "type": "string"
                        },
                        "person_uid": {
                            "type": "string",
                            "description": "a unique identifier given to the individual (as opposed to the officership)"
                        },
                        "address": {
                            "$ref": "#/definitions/address"
                        },
                        "type": {
                            "type": "string",
                            "enum": [
                                "Person",
                                "Company"
                            ],
                            "description": "The type of entity that is the officer (either 'Person' or 'Company')"
                        }
                    }
                }
            },
            "required": [
                "name"
            ]
        },
        "share-parcel": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "type": "object",
            "description": "A parcel of shares in a company",
            "properties": {
                "number_of_shares": {
                    "description": "Number of shares, if known",
                    "type": "integer"
                },
                "percentage_of_shares": {
                    "description": "Percentage of shares, if known",
                    "type": "number",
                    "maximum": 100,
                    "minimum": 0
                },
                "percentage_of_shares_min": {
                    "description": "Minimum percentage of shares (if for example a band of percentage is given)",
                    "type": [
                        "number",
                        "null"
                    ],
                    "maximum": 100,
                    "minimum": 0
                },
                "percentage_of_shares_max": {
                    "description": "Maximum percentage of shares (if for example a band of percentage is given)",
                    "type": [
                        "number",
                        "null"
                    ],
                    "maximum": 100,
                    "minimum": 0
                },
                "voting_percentage": {
                    "description": "Percentage of votes, if known",
                    "type": "number",
                    "maximum": 100,
                    "minimum": 0
                },
                "voting_percentage_min": {
                    "description": "Minimum percentage of votes (if for example a band of votes is given)",
                    "type": [
                        "number",
                        "null"
                    ],
                    "maximum": 100,
                    "minimum": 0
                },
                "voting_percentage_max": {
                    "description": "Maximum percentage of votes (if for example a band of votes is given)",
                    "type": [
                        "number",
                        "null"
                    ],
                    "maximum": 100,
                    "minimum": 0
                },
                "share_class": {
                    "description": "Share class or classes, if known",
                    "type": "string"
                },
                "start_date": {
                    "type": "string",
                    "_format": "date"
                },
                "end_date": {
                    "type": "string",
                    "_format": "date"
                },
                "sample_date": {
                    "type": "string",
                    "_format": "date"
                },
                "shareholders": {
                    "description": "Legal persons who own this share parcel",
                    "type": "array",
                    "minItems": 1,
                    "items": {
                        "type": "object",
                        "name": "shareholder",
                        "required": [
                            "name"
                        ],
                        "properties": {
                            "name": {
                                "description": "Name of natural person or company",
                                "type": "string",
                                "minLength": 1
                            },
                            "jurisdiction": {
                                "description": "Jurisdiction of registration, if company",
                                "type": "string"
                            },
                            "company_number": {
                                "description": "Company number, if company and known",
                                "type": "string"
                            },
                            "identifier": {
                                "description": "Unique identifier of person",
                                "type": "string"
                            },
                            "type": {
                                "description": "Type of person if known (company or natural person)",
                                "enum": [
                                    "Company",
                                    "Person"
                                ]
                            },
                            "address": {
                                "description": "Address given for shareholder",
                                "$ref": "#/definitions/address"
                            },
                            "address_country": {
                                "description": "Country part of owner's address (for example if address not given)",
                                "type": "string"
                            }
                        }
                    }
                }
            }
        },
        "total-shares": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "The total number of shares a company has issued",
            "type": "object",
            "properties": {
                "number": {
                    "type": "integer"
                },
                "share_class": {
                    "type": "string",
                    "minLength": 1
                }
            },
            "required": [
                "number"
            ]
        },
        "filing": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "A statutory filing",
            "type": "object",
            "properties": {
                "title": {
                    "type": "string"
                },
                "date": {
                    "type": "string",
                    "_format": "date"
                },
                "description": {
                    "type": "string"
                },
                "uid": {
                    "type": "string"
                },
                "url": {
                    "type": "string"
                },
                "filing_type_code": {
                    "type": "string"
                },
                "filing_type_name": {
                    "type": "string"
                },
                "other_attributes": {
                    "type": "object"
                }
            },
            "required": [
                "date"
            ],
            "anyOf": [
                {
                    "required": [
                        "title"
                    ]
                },
                {
                    "required": [
                        "description"
                    ]
                },
                {
                    "required": [
                        "filing_type_name"
                    ]
                }
            ]
        },
        "identifier": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An identifier for an entity (possibly other things, e.g. securities in the future). Examples are tax IDs, non-profit IDs, SEC CIK numbers, Federal Reserve RSSD id. The main requirements for an identifier is that they should be well-defined, and issued by a government or have statutory standing",
            "type": "object",
            "properties": {
                "uid": {
                    "type": "string",
                    "description": "The unique identifier given by the identifier system \u2013 it should be unique in the context of the identifier_system",
                    "minLength": 1
                },
                "identifier_system_code": {
                    "type": "string",
                    "description": "An identifier representing the identifier scheme. Some examples of this are us_fein (US Federal tax number), us_sec_cik (US Securities and Exchange Commission CIK), uk_ew_cc (Charity Commission of England & Wales), lei (Global Legal Entity Identifier System)"
                }
            },
            "required": [
                "uid",
                "identifier_system_code"
            ]
        },
        "industry-code": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An industry code from a standard code list (e.g. NAICS 2007 or NACE 2). This schema is a sub-schema of Classification.",
            "type": "object",
            "properties": {
                "name": {
                    "type": "string"
                },
                "code": {
                    "type": "string"
                },
                "code_scheme_id": {
                    "type": "string",
                    "description": "An identifier representing industry code scheme. At the moment these are eu_nace_2, uk_sic_2003, uk_sic_2007, us_naics_2002, us_naics_2007, be_nace_2008, dk_db_2007, nz_bic_2006, no_sic_2007, anz_sic_2006, nz_bic_2006, in_nic_2004_mca, ca_qc_cae, lu_nace_2. For other code schemes, or details of these, contact info@opencorporates.com"
                },
                "start_date": {
                    "type": "string",
                    "_format": "date"
                },
                "end_date": {
                    "type": "string",
                    "_format": "date"
                }
            },
            "required": [
                "code",
                "code_scheme_id"
            ]
        },
        "previous-name": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "name": "PreviousName",
            "description": "A previous name of a company",
            "type": "object",
            "properties": {
                "company_name": {
                    "type": "string",
                    "minLength": 1
                },
                "con_date": {
                    "type": "string",
                    "_format": "date",
                    "description": "The end (conversion) date of the name"
                },
                "start_date": {
                    "type": "string",
                    "_format": "date"
                }
            },
            "required": [
                "company_name"
            ]
        },
        "alternative-name": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An alternative name of a company, e.g. abbreviation, trading (including dba or doing business as), legal. As well as trading names etc, it can be used for storing alternative language representations of the legal name, in which case the language should be represented as two-letter ISO-639 code",
            "type": "object",
            "properties": {
                "company_name": {
                    "type": "string",
                    "minLength": 1
                },
                "start_date": {
                    "type": "string",
                    "_format": "date"
                },
                "end_date": {
                    "type": "string",
                    "_format": "date"
                },
                "language": {
                    "type": "string",
                    "minLength": 2,
                    "maxLength": 2
                },
                "type": {
                    "type": "string",
                    "enum": [
                        "trading",
                        "abbreviation",
                        "legal",
                        "unknown",
                        "alias"
                    ]
                }
            },
            "required": [
                "company_name",
                "type"
            ]
        },
        "person": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "A person, for example, referenced in some other context, e.g. director of a company, shareholder, licence-holder, lobbyist. This should be used only if the person is the subject of the datum",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "$ref": "#/definitions/person-name"
                },
                "jurisdiction": {
                    "type": "string",
                    "description": "Name of the jurisdiction in which the entity is based"
                },
                "company": {
                    "description": "Company the person is representing. NB If the licence holder is a company, and the individual is a just a contact, then use the company-schema for the entity. This is where the individual themselves are the subject entity (e.g. licence holder, disqualified director)",
                    "$ref": "#/definitions/company-for-nesting"
                },
                "relationship_with_company": {
                    "enum": [
                        "employee",
                        "director",
                        "shareholder",
                        null
                    ]
                },
                "website": {
                    "oneOf": [
                        {
                            "type": "string",
                            "minLength": 5
                        },
                        {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string",
                                "minLength": 5
                            }
                        }
                    ]
                },
                "uid": {
                    "description": "Unique id of the person. Note: the unique id is not expected to be globally unique, but only unique with reference to the source from which it is derived. No check is made for uniqueness",
                    "type": "string",
                    "minLength": 1
                },
                "telephone_number": {
                    "type": "string",
                    "minLength": 4
                },
                "fax_number": {
                    "type": "string",
                    "minLength": 4
                },
                "registered_address": {
                    "description": "address for service (or address given in the context of legal requirement)",
                    "$ref": "#/definitions/address"
                },
                "headquarters_address": {
                    "$ref": "#/definitions/address"
                },
                "mailing_address": {
                    "$ref": "#/definitions/address"
                },
                "addresses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/address-with-type"
                    }
                },
                "industry_codes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/industry-code"
                    }
                },
                "alternative_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/alternative-name"
                    }
                },
                "date_of_birth": {
                    "anyOf": [
                        {
                            "type": "string",
                            "_format": "date"
                        },
                        {
                            "$ref": "#/definitions/date"
                        }
                    ]
                },
                "nationality": {
                    "description": "The person's nationality",
                    "type": "string",
                    "_format": "non-blank"
                },
                "country_of_residence": {
                    "description": "The normal country of residence for the person",
                    "type": "string",
                    "_format": "non-blank"
                },
                "identifiers": {
                    "type": [
                        "array",
                        "null"
                    ],
                    "items": {
                        "$ref": "#/definitions/identifier"
                    }
                },
                "other_attributes": {
                    "description": "Use for other attributes for which we don't yet have curated schema attributes",
                    "type": "object"
                }
            },
            "required": [
                "name"
            ]
        },
        "person-name": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "oneOf": [
                {
                    "type": [
                        "string",
                        "null"
                    ],
                    "_format": "non-blank"
                },
                {
                    "description": "The name of a person as an object",
                    "type": "object",
                    "properties": {
                        "given_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank",
                            "description": "The given name(s) (often first name) of a person, as opposed to their family name. Following FOAF practice, this is preferred to first_name"
                        },
                        "family_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank",
                            "description": "The family name (often last name) of a person, as opposed to their family name. Following FOAF practice, this is preferred to last_name"
                        },
                        "first_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank"
                        },
                        "middle_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank"
                        },
                        "last_name": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank"
                        },
                        "title": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank",
                            "description": "Title such as Mr, Ms, Dr etc"
                        },
                        "suffixes": {
                            "type": [
                                "string",
                                "null"
                            ],
                            "_format": "non-blank",
                            "description": "Any suffixes, including degrees, honours (OBE), ordinals (John Smith Jr, Bill Jones II) etc"
                        }
                    }
                }
            ]
        },
        "date": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "A parsed date object. This allows us to represent not just normal dates, but also partial dates too",
            "type": "object",
            "properties": {
                "year": {
                    "type": "number",
                    "description": "year part as YYYY"
                },
                "month": {
                    "type": "number",
                    "description": "month part of date in numbers e.g. 11 for November, 4 for April"
                },
                "day": {
                    "type": [
                        "number",
                        "null"
                    ],
                    "description": "day part of date in numbers"
                }
            },
            "additionalProperties": false,
            "anyOf": [
                {
                    "required": [
                        "year",
                        "month"
                    ]
                },
                {
                    "required": [
                        "month",
                        "day"
                    ]
                }
            ]
        },
        "organisation": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An entity which is a distinct organisation, but is not a company nor an individual. Examples include governments and governmental entities (e.g. Multilateral Development Banks, Government Departments, municipalities, etc), and also membership organisations",
            "type": "object",
            "additionalProperties": false,
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name of the entity",
                    "minLength": 1
                },
                "jurisdiction": {
                    "type": "string",
                    "description": "Name of the jurisdiction in which the entity is incorporated/domiciled (use global for global entities, e.g. UN)"
                },
                "legal_form": {
                    "type": "string",
                    "description": "legal form of organisation, e.g. municipality, government department, trust, etc"
                },
                "website": {
                    "oneOf": [
                        {
                            "type": "string",
                            "minLength": 5
                        },
                        {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string",
                                "minLength": 5
                            }
                        }
                    ]
                },
                "telephone_number": {
                    "type": "string",
                    "minLength": 4
                },
                "fax_number": {
                    "type": "string",
                    "minLength": 4
                },
                "identifiers": {
                    "type": [
                        "array",
                        "null"
                    ],
                    "items": {
                        "$ref": "#/definitions/identifier"
                    }
                },
                "registered_address": {
                    "$ref": "#/definitions/address"
                },
                "headquarters_address": {
                    "$ref": "#/definitions/address"
                },
                "mailing_address": {
                    "$ref": "#/definitions/address"
                },
                "addresses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/address-with-type"
                    }
                },
                "industry_codes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/industry-code"
                    }
                },
                "previous_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/previous-name"
                    }
                },
                "alternative_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/alternative-name"
                    }
                },
                "other_attributes": {
                    "description": "Use for other attributes for which we don't yet have curated schema attributes",
                    "type": "object"
                }
            },
            "required": [
                "name"
            ]
        },
        "unknown-entity-type": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "description": "An entity of unknown type - potentially a company, a person, government entity, or some unincorporated organisation",
            "additionalProperties": false,
            "type": "object",
            "properties": {
                "name": {
                    "type": "string",
                    "description": "Name of the entity",
                    "minLength": 1
                },
                "jurisdiction": {
                    "type": "string",
                    "description": "Name of the jurisdiction in which the entity is incorporated/domiciled"
                },
                "uid": {
                    "description": "Unique id for the entity if it has one",
                    "type": "string"
                },
                "website": {
                    "oneOf": [
                        {
                            "type": "string",
                            "minLength": 5
                        },
                        {
                            "type": [
                                "array",
                                "null"
                            ],
                            "items": {
                                "type": "string",
                                "minLength": 5
                            }
                        }
                    ]
                },
                "telephone_number": {
                    "type": "string",
                    "minLength": 4
                },
                "fax_number": {
                    "type": "string",
                    "minLength": 4
                },
                "registered_address": {
                    "$ref": "#/definitions/address"
                },
                "headquarters_address": {
                    "$ref": "#/definitions/address"
                },
                "mailing_address": {
                    "$ref": "#/definitions/address"
                },
                "addresses": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/address-with-type"
                    }
                },
                "identifiers": {
                    "type": [
                        "array",
                        "null"
                    ],
                    "items": {
                        "$ref": "#/definitions/identifier"
                    }
                },
                "industry_codes": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/industry-code"
                    }
                },
                "previous_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/previous-name"
                    }
                },
                "alternative_names": {
                    "type": "array",
                    "items": {
                        "$ref": "#/definitions/alternative-name"
                    }
                },
                "other_attributes": {
                    "description": "Use for other attributes for which we don't yet have curated schema attributes",
                    "type": "object"
                }
            },
            "required": [
                "name"
            ]
        },
        "classification": {
            "$schema": "http://json-schema.org/draft-04/schema#",
            "title": "Classification",
            "description": "A classification from a code list",
            "type": "object",
            "properties": {
                "code_scheme_id": {
                    "description": "The scheme of the classification",
                    "type": "string"
                },
                "code": {
                    "description": "The classification",
                    "type": "string"
                },
                "name": {
                    "description": "A title or description of the classification, especially if the value is a code",
                    "type": "string"
                }
            },
            "additionalProperties": false,
            "anyOf": [
                {
                    "required": [
                        "name"
                    ]
                },
                {
                    "required": [
                        "code",
                        "code_scheme_id"
                    ]
                }
            ]
        }
    }
}