From 71f2c71c767c91ae8be3908f914c8785b1f5cc2e Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2018 13:40:19 -0700 Subject: [PATCH 1/5] FeatureCollection requires a type property --- core/openapi/schemas/featureCollectionGeoJSON.yaml | 5 +++++ swagger.yaml | 5 +++++ 2 files changed, 10 insertions(+) diff --git a/core/openapi/schemas/featureCollectionGeoJSON.yaml b/core/openapi/schemas/featureCollectionGeoJSON.yaml index 61badc9d..649449db 100644 --- a/core/openapi/schemas/featureCollectionGeoJSON.yaml +++ b/core/openapi/schemas/featureCollectionGeoJSON.yaml @@ -1,7 +1,12 @@ type: object required: + - type - features properties: + type: + type: string + enum: + - FeatureCollection features: type: array items: diff --git a/swagger.yaml b/swagger.yaml index 589604f7..e7563971 100644 --- a/swagger.yaml +++ b/swagger.yaml @@ -343,8 +343,13 @@ definitions: featureCollection: type: object required: + - type - features properties: + type: + type: string + enum: + - FeatureCollection features: type: array items: From 22e597aa7a0340c74b799e959e99cc56c2d2c9e5 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2018 16:52:07 -0700 Subject: [PATCH 2/5] GeometryCollection requires geometries --- core/openapi/schemas/geometrycollectionGeoJSON.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/core/openapi/schemas/geometrycollectionGeoJSON.yaml b/core/openapi/schemas/geometrycollectionGeoJSON.yaml index 0eb9001a..91f3127e 100644 --- a/core/openapi/schemas/geometrycollectionGeoJSON.yaml +++ b/core/openapi/schemas/geometrycollectionGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - geometries properties: type: type: string From bd71d53bf33e085cffb74561a123e8fce94802ec Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2018 16:56:35 -0700 Subject: [PATCH 3/5] Geometries require coordinates --- core/openapi/schemas/linestringGeoJSON.yaml | 1 + core/openapi/schemas/multilinestringGeoJSON.yaml | 1 + core/openapi/schemas/multipointGeoJSON.yaml | 1 + core/openapi/schemas/multipolygonGeoJSON.yaml | 1 + core/openapi/schemas/pointGeoJSON.yaml | 1 + 5 files changed, 5 insertions(+) diff --git a/core/openapi/schemas/linestringGeoJSON.yaml b/core/openapi/schemas/linestringGeoJSON.yaml index a8fadc32..610f6761 100644 --- a/core/openapi/schemas/linestringGeoJSON.yaml +++ b/core/openapi/schemas/linestringGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - coordinates properties: type: type: string diff --git a/core/openapi/schemas/multilinestringGeoJSON.yaml b/core/openapi/schemas/multilinestringGeoJSON.yaml index 30a2f984..77feb9a2 100644 --- a/core/openapi/schemas/multilinestringGeoJSON.yaml +++ b/core/openapi/schemas/multilinestringGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - coordinates properties: type: type: string diff --git a/core/openapi/schemas/multipointGeoJSON.yaml b/core/openapi/schemas/multipointGeoJSON.yaml index 3fa8f1ae..01f28e62 100644 --- a/core/openapi/schemas/multipointGeoJSON.yaml +++ b/core/openapi/schemas/multipointGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - coordinates properties: type: type: string diff --git a/core/openapi/schemas/multipolygonGeoJSON.yaml b/core/openapi/schemas/multipolygonGeoJSON.yaml index c28e756b..cf4c5e12 100644 --- a/core/openapi/schemas/multipolygonGeoJSON.yaml +++ b/core/openapi/schemas/multipolygonGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - coordinates properties: type: type: string diff --git a/core/openapi/schemas/pointGeoJSON.yaml b/core/openapi/schemas/pointGeoJSON.yaml index 465958ce..68bf8cd6 100644 --- a/core/openapi/schemas/pointGeoJSON.yaml +++ b/core/openapi/schemas/pointGeoJSON.yaml @@ -1,6 +1,7 @@ type: object required: - type + - coordinates properties: type: type: string From ae95ab179864591e5415fbd5ab204738412f9fc7 Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2018 17:02:18 -0700 Subject: [PATCH 4/5] Schema for Polygon --- core/openapi/schemas/polygonGeoJSON.yaml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 core/openapi/schemas/polygonGeoJSON.yaml diff --git a/core/openapi/schemas/polygonGeoJSON.yaml b/core/openapi/schemas/polygonGeoJSON.yaml new file mode 100644 index 00000000..298bcc91 --- /dev/null +++ b/core/openapi/schemas/polygonGeoJSON.yaml @@ -0,0 +1,19 @@ +type: object +required: + - type + - coordinates +properties: + type: + type: string + enum: + - Polygon + coordinates: + type: array + items: + type: array + minItems: 4 + items: + type: array + minItems: 2 + items: + type: number \ No newline at end of file From e5ee93fb7da3a693f84bad052394cc3582cdceae Mon Sep 17 00:00:00 2001 From: Tim Schaub Date: Sat, 3 Mar 2018 17:04:09 -0700 Subject: [PATCH 5/5] Correct refs to geometries --- core/openapi/schemas/geometryGeoJSON.yaml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/core/openapi/schemas/geometryGeoJSON.yaml b/core/openapi/schemas/geometryGeoJSON.yaml index c04aec48..28ef965e 100644 --- a/core/openapi/schemas/geometryGeoJSON.yaml +++ b/core/openapi/schemas/geometryGeoJSON.yaml @@ -1,8 +1,8 @@ oneOf: -- $ref: 'Point.yaml' -- $ref: 'MultiPoint.yaml' -- $ref: 'LineString.yaml' -- $ref: 'MultiLineString.yaml' -- $ref: 'Polygon.yaml' -- $ref: 'MultiPolygon.yaml' -- $ref: 'GeometryCollection.yaml' \ No newline at end of file +- $ref: 'pointGeoJSON.yaml' +- $ref: 'multipointGeoJSON.yaml' +- $ref: 'linestringGeoJSON.yaml' +- $ref: 'multilinestringGeoJSON.yaml' +- $ref: 'polygonGeoJSON.yaml' +- $ref: 'multipolygonGeoJSON.yaml' +- $ref: 'geometrycollectionGeoJSON.yaml'