Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
CIM - Context Information Management
NGSI-LD API
Commits
0e59f0b6
Commit
0e59f0b6
authored
Jan 29, 2021
by
Stefan Wiedemann
Browse files
add type
parent
17b9fa6f
Pipeline
#5830
passed with stage
Changes
1
Pipelines
1
Show whitespace changes
Inline
Side-by-side
schema/geometry-schema.json
View file @
0e59f0b6
...
...
@@ -4,53 +4,98 @@
"title"
:
"geometry"
,
"description"
:
"One geometry as defined by GeoJSON. Licensed as per original source is https://github.com/fge/sample-json-schemas/blob/master/geojson/geometry.json"
,
"type"
:
"object"
,
"required"
:
[
"type"
,
"coordinates"
],
"required"
:
[
"type"
,
"coordinates"
],
"oneOf"
:
[
{
"title"
:
"Point"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"Point"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/position"
}
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"Point"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/position"
}
}
},
{
"title"
:
"MultiPoint"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"MultiPoint"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/positionArray"
}
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"MultiPoint"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/positionArray"
}
}
},
{
"title"
:
"LineString"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"LineString"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/lineString"
}
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"LineString"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/lineString"
}
}
},
{
"title"
:
"MultiLineString"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"MultiLineString"
]
},
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"MultiLineString"
]
},
"coordinates"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/lineString"
}
"items"
:
{
"$ref"
:
"#/definitions/lineString"
}
}
}
},
{
"title"
:
"Polygon"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"Polygon"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/polygon"
}
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"Polygon"
]
},
"coordinates"
:
{
"$ref"
:
"#/definitions/polygon"
}
}
},
{
"title"
:
"MultiPolygon"
,
"properties"
:
{
"type"
:
{
"enum"
:
[
"MultiPolygon"
]
},
"type"
:
{
"type"
:
"string"
,
"enum"
:
[
"MultiPolygon"
]
},
"coordinates"
:
{
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/polygon"
}
"items"
:
{
"$ref"
:
"#/definitions/polygon"
}
}
}
}
...
...
@@ -60,32 +105,51 @@
"description"
:
"A single position"
,
"type"
:
"array"
,
"minItems"
:
2
,
"items"
:
[
{
"type"
:
"number"
},
{
"type"
:
"number"
}
],
"items"
:
[
{
"type"
:
"number"
},
{
"type"
:
"number"
}
],
"additionalItems"
:
false
},
"positionArray"
:
{
"description"
:
"An array of positions"
,
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/position"
}
"items"
:
{
"$ref"
:
"#/definitions/position"
}
},
"lineString"
:
{
"description"
:
"An array of two or more positions"
,
"allOf"
:
[
{
"$ref"
:
"#/definitions/positionArray"
},
{
"minItems"
:
2
}
{
"$ref"
:
"#/definitions/positionArray"
},
{
"minItems"
:
2
}
]
},
"linearRing"
:
{
"description"
:
"An array of four positions where the first equals the last"
,
"allOf"
:
[
{
"$ref"
:
"#/definitions/positionArray"
},
{
"minItems"
:
4
}
{
"$ref"
:
"#/definitions/positionArray"
},
{
"minItems"
:
4
}
]
},
"polygon"
:
{
"description"
:
"An array of linear rings"
,
"type"
:
"array"
,
"items"
:
{
"$ref"
:
"#/definitions/linearRing"
}
"items"
:
{
"$ref"
:
"#/definitions/linearRing"
}
}
}
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment