Skip to content

Commit

Permalink
Merge pull request #54 from tschaub/geojson-schema
Browse files Browse the repository at this point in the history
Updates for GeoJSON schema
  • Loading branch information
cportele authored Mar 4, 2018
2 parents 8eee576 + e5ee93f commit 7f9a386
Show file tree
Hide file tree
Showing 10 changed files with 42 additions and 7 deletions.
5 changes: 5 additions & 0 deletions core/openapi/schemas/featureCollectionGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
type: object
required:
- type
- features
properties:
type:
type: string
enum:
- FeatureCollection
features:
type: array
items:
Expand Down
14 changes: 7 additions & 7 deletions core/openapi/schemas/geometryGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -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'
- $ref: 'pointGeoJSON.yaml'
- $ref: 'multipointGeoJSON.yaml'
- $ref: 'linestringGeoJSON.yaml'
- $ref: 'multilinestringGeoJSON.yaml'
- $ref: 'polygonGeoJSON.yaml'
- $ref: 'multipolygonGeoJSON.yaml'
- $ref: 'geometrycollectionGeoJSON.yaml'
1 change: 1 addition & 0 deletions core/openapi/schemas/geometrycollectionGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- geometries
properties:
type:
type: string
Expand Down
1 change: 1 addition & 0 deletions core/openapi/schemas/linestringGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- coordinates
properties:
type:
type: string
Expand Down
1 change: 1 addition & 0 deletions core/openapi/schemas/multilinestringGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- coordinates
properties:
type:
type: string
Expand Down
1 change: 1 addition & 0 deletions core/openapi/schemas/multipointGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- coordinates
properties:
type:
type: string
Expand Down
1 change: 1 addition & 0 deletions core/openapi/schemas/multipolygonGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- coordinates
properties:
type:
type: string
Expand Down
1 change: 1 addition & 0 deletions core/openapi/schemas/pointGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
type: object
required:
- type
- coordinates
properties:
type:
type: string
Expand Down
19 changes: 19 additions & 0 deletions core/openapi/schemas/polygonGeoJSON.yaml
Original file line number Diff line number Diff line change
@@ -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
5 changes: 5 additions & 0 deletions swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -343,8 +343,13 @@ definitions:
featureCollection:
type: object
required:
- type
- features
properties:
type:
type: string
enum:
- FeatureCollection
features:
type: array
items:
Expand Down

0 comments on commit 7f9a386

Please sign in to comment.