{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://quadruper.invalid/contracts/geoapi-geocode-response.v1.schema.json",
  "title": "GeocodeResponse",
  "description": "GET /v2/geocode and GET /v2/reverse 200 body. reference is present only when near_text was used.",
  "type": "object",
  "properties": {
    "results": { "type": "array", "maxItems": 10, "items": { "$ref": "geoapi-common.v1.schema.json#/$defs/place" } },
    "reference": {
      "title": "Reference",
      "type": "object",
      "properties": {
        "label": { "type": "string", "minLength": 1 },
        "location": { "$ref": "geoapi-common.v1.schema.json#/$defs/lnglat" }
      },
      "required": ["label", "location"],
      "additionalProperties": false
    },
    "attribution": { "$ref": "geoapi-common.v1.schema.json#/$defs/attribution" }
  },
  "required": ["results", "attribution"],
  "additionalProperties": false
}
