{
	"title": "JSON schema for the Source Maps v3",
	"$schema": "http://json-schema.org/draft-04/schema#",

	"type": "object",
	"required": [ "version" ],

	"definitions": {
		"sectionMap": {
			"oneOf": [
				{
					"additionalProperties": false,
					"properties": {
						"url": {
							"type": "string"
						}
					}
				},
				{
					"additionalProperties": false,
					"properties": {
						"map": {
							"$ref": "#"
						}
					}
				}
			]
		}
	},

	"patternProperties": {
		"^x_": {
			"description": "Any property starting with 'x_' is valid.",
			"additionalItems": true,
			"additionalProperties": true
		}
	},

	"properties": {
		"version": {
			"type": "integer",
			"description": " File version (always the first entry in the object) and must be a positive integer.",
			"default": 3
		},
		"file": {
			"type": "string",
			"default": "An optional name of the generated code that this source map is associated with."
		},
		"sourceRoot": {
			"type": "string",
			"default": " An optional source root, useful for relocating source files on a server or removing repeated values in the 'sources' entry.  This value is prepended to the individual entries in the 'source' field."
		},
		"sources": {
			"type": "array",
			"description": "A list of original sources used by the 'mappings' entry.",
			"items": {
				"type": "string"
			}
		},
		"sourcesContent": {
			"type": "array",
			"description": "An optional list of source content, useful when the 'source' can’t be hosted. The contents are listed in the same order as the sources in line 5. 'null' may be used if some original sources should be retrieved by name.",
			"items": {
				"type": [ "string", "null" ]
			}
		},
		"names": {
			"type": "array",
			"description": "A list of symbol names used by the 'mappings' entry.",
			"items": {
				"type": "string"
			}
		},
		"mappings": {
			"type": "string",
			"description": "A string with the encoded mapping data."
		},
		"sections": {
			"type": "array",
			"minItems": 1,
			"uniqueItems": true,
			"additionalItems": {
				"allOf": [ { "$ref": "#/definitions/sectionMap" } ],
				"properties": {
					"offset": {
						"type": "object",
						"properties": {
							"line": {
								"type": "integer"
							},
							"column": {
								"type": "integer"
							}
						}
					}
				}
			}
		}
	}
}
