Commit ca302206 authored by canterafonsj's avatar canterafonsj
Browse files

Now GeoProperty

parent 97b290f4
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -16,5 +16,12 @@
  "closeTo": {
    "type": "Relationship",
    "object": "urn:ngsi-ld:Building:B1234"  
  },
  "location": {
      "type": "GeoProperty",
      "value": {
        "type":"Point",
        "coordinates": [-8,44]  
      }
  }  
}
+36 −0
Original line number Diff line number Diff line
@@ -95,6 +95,39 @@
          }
        }
      ]
    },
    "GeoProperty": {
      "allOf": [
        {
          "$ref": "#/definitions/Commons"
        },
        {
          "type": "object",
          "properties": {
            "type": {
              "type": "string",
              "const": "GeoProperty"
            },
            "value": {
              "$ref": "https://raw.githubusercontent.com/Fiware/dataModels/master/geometry-schema.json"
            }
          },
          "required": [
            "type",
            "value"
          ],
          "additionalProperties": {
            "anyOf": [
              {
                "$ref": "#/definitions/Property"
              },
              {
                "$ref": "#/definitions/Relationship"
              }
            ]
          }
        }
      ]
    }
  },
  "type": "object",
@@ -119,6 +152,9 @@
      },
      {
        "$ref": "#/definitions/Relationship"
      },
      {
        "$ref": "#/definitions/GeoProperty"
      }
    ]
  }