{
    "$schema": "http://json-schema.org/draft-06/schema#",
    "description": "Resource json format",
    "type": "object",
    "properties": {
        "street": {
            "description": "Street name",
            "type": "string"
        },
        "number": {
            "description": "Construction street number",
            "type": "integer"
        },
        "dir": {
            "description": "The root directory for all resources for this construction",
            "type": "string",
            "format": "uri-reference"
        },
        "location": {
            "description": "The geographical coordinates of construction",
            "type": "object",
            "properties": {
                "type": {
                    "description": "GeoJSON type Point",
                    "type": "string"
                },
                "coordinates": {
                    "description": "GeoJSON value, longitude and latitide",
                    "type": "array",
                    "minItems": 2,
                    "items": {
                        "type": "number"
                    }
                }
            }
        },
        "resources": {
            "description": "Array of models related to this construction",
            "type": "array",
            "items": {
                "description": "Model document",
                "type": "object",
                "properties": {
                    "format": {
                        "description": "Format type of model",
                        "type": "string"
                    },
                    "filename": {
                        "description": "Filename of model",
                        "type": "string"
                    },
                    "url": {
                        "description": "Full URL of model",
                        "type": "string",
                        "format": "uri-reference"
                    },
                    "uploaded": {
                        "description": "The timestamp of upload",
                        "type": "string",
                        "format": "date-time"
                    },
                    "textures": {
                        "description": "Textures assigned to this model",
                        "type": "array",
                        "items": {
                            "description": "Texture document",
                            "type": "object",
                            "properties": {
                                "type": {
                                    "description": "Texture type",
                                    "type": "integer"
                                },
                                "format": {
                                    "description": "Format type of texture",
                                    "type": "string"
                                },
                                "filename": {
                                    "description": "Filename of texture",
                                    "type": "string"
                                },
                                "url": {
                                    "description": "Full URL of texture",
                                    "type": "string",
                                    "format": "uri-reference"
                                },
                                "uploaded": {
                                    "description": "The timestamp of upload",
                                    "type": "string",
                                    "format": "date-time"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}