{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://schemas.opengis.net/json-fg/featurecollection.json",
  "title": "a JSON-FG Feature Collection",
  "description": "This JSON Schema is part of JSON-FG version 1.0.0.",
  "type": "object",
  "required": ["type", "features"],
  "properties": {
    "type": {"const": "FeatureCollection"},
    "featureType": {"$ref": "featuretype.json"},
    "geometryDimension": {"type": "integer", "minimum": 0, "maximum": 3},
    "featureSchema": {"$ref": "featureschema.json"},
    "coordRefSys": {"$ref": "coordrefsys.json"},
    "measures": {"$ref": "measures.json"},
    "features": {
      "type": "array",
      "items": {
        "allOf": [
          {"$ref": "feature.json"},
          {
            "not": {
              "type": "object",
              "properties": {"coordRefSys": {}},
              "required": ["coordRefSys"]
            }
          },
          {
            "not": {
              "type": "object",
              "properties": {"conformsTo": {}},
              "required": ["conformsTo"]
            }
          }
        ]
      }
    }
  }
}
