forked from geovisto/geovisto-arcgis-connector
-
Notifications
You must be signed in to change notification settings - Fork 0
/
openapi.json
1 lines (1 loc) · 9.44 KB
/
openapi.json
1
{"openapi":"3.0.2","info":{"title":"Geovisto ArcGIS Connector","description":"\nService for obtaining data from [ArcGIS HUB](https://gist.github.com/hamhands/b6d1f0f514678b88cdc01070bf006263#get-apiv3explaindatasets) open data catalogs. All the served data are parsed specifically for [Geovisto library](https://github.com/geovisto/geovisto-map).\n\n**Codebase available at**: [https://github.com/geovisto/geovisto-arcgis-connector](https://github.com/geovisto/geovisto-arcgis-connector)\n","contact":{"name":"Petr Knetl","email":"[email protected]"},"version":"0.1.0"},"paths":{"/datasets/":{"get":{"tags":["dataset_list"],"summary":"Dataset List","description":"Searches ArcGIS HUB opendata catologs and returns the best match with query parameter **q**.","operationId":"dataset_list_datasets__get","parameters":[{"required":true,"schema":{"title":"Q","type":"string"},"name":"q","in":"query"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"title":"Response Dataset List Datasets Get","type":"array","items":{"$ref":"#/components/schemas/DatasetMetadata"}}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/datasets/{dataset_id}":{"get":{"tags":["dataset"],"summary":"Dataset","description":"Based on ArcGIS HUB dataset ID (**dataset_id**) get and parse it's Geovisto-ready data.","operationId":"dataset_datasets__dataset_id__get","parameters":[{"required":true,"schema":{"title":"Dataset Id","type":"string"},"name":"dataset_id","in":"path"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DatasetGeospatial"}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"Centroid":{"title":"Centroid","required":["id","lat","long"],"type":"object","properties":{"id":{"title":"Id","type":"integer"},"lat":{"title":"Lat","type":"number"},"long":{"title":"Long","type":"number"}},"description":"Defines central point of Feature object."},"DatasetGeospatial":{"title":"DatasetGeospatial","required":["data","geometry","centroids"],"type":"object","properties":{"data":{"title":"Data","type":"array","items":{"type":"object"}},"geometry":{"title":"Geometry","type":"array","items":{"$ref":"#/components/schemas/GeovistoFeature"}},"centroids":{"title":"Centroids","type":"array","items":{"$ref":"#/components/schemas/Centroid"}}},"description":"Compound of all dataset parsed data for Geovisto."},"DatasetMetadata":{"title":"DatasetMetadata","required":["id","name","description","fields","thumbnail","structuredLicense","recordCount","url","data"],"type":"object","properties":{"id":{"title":"Id","type":"string"},"name":{"title":"Name","type":"string"},"description":{"title":"Description","type":"string"},"snippet":{"title":"Snippet","type":"string"},"fields":{"title":"Fields","type":"array","items":{"$ref":"#/components/schemas/Field"}},"thumbnail":{"title":"Thumbnail","maxLength":2083,"minLength":1,"type":"string","format":"uri"},"structuredLicense":{"title":"Structuredlicense","type":"object"},"tags":{"title":"Tags","type":"array","items":{"type":"string"},"default":[]},"recordCount":{"title":"Recordcount","type":"integer"},"slug":{"title":"Slug","type":"string"},"url":{"title":"Url","maxLength":2083,"minLength":1,"type":"string","format":"uri"},"data":{"title":"Data","maxLength":2083,"minLength":1,"type":"string","format":"uri"}},"description":"Description of ArcGIS Hub dataset."},"Field":{"title":"Field","required":["name","alias","type"],"type":"object","properties":{"sqlType":{"title":"Sqltype","type":"string"},"nullable":{"title":"Nullable","type":"boolean"},"editable":{"title":"Editable","type":"boolean"},"length":{"title":"Length","type":"integer"},"defaultValue":{"title":"Defaultvalue"},"domain":{"title":"Domain"},"name":{"title":"Name","type":"string"},"alias":{"title":"Alias","type":"string"},"type":{"title":"Type","type":"string"}},"description":"Dataset column description."},"GeovistoFeature":{"title":"GeovistoFeature","required":["id"],"type":"object","properties":{"type":{"title":"Type","type":"string","const":"Feature"},"geometry":{"title":"Geometry","anyOf":[{"$ref":"#/components/schemas/Point"},{"$ref":"#/components/schemas/MultiPoint"},{"$ref":"#/components/schemas/LineString"},{"$ref":"#/components/schemas/MultiLineString"},{"$ref":"#/components/schemas/Polygon"},{"$ref":"#/components/schemas/MultiPolygon"}]},"properties":{"title":"Properties","type":"object"},"id":{"title":"Id","type":"integer"},"bbox":{"title":"Bbox","anyOf":[{"maxItems":4,"minItems":4,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":6,"minItems":6,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}},"description":"GeoJSON Feature"},"HTTPValidationError":{"title":"HTTPValidationError","type":"object","properties":{"detail":{"title":"Detail","type":"array","items":{"$ref":"#/components/schemas/ValidationError"}}}},"LineString":{"title":"LineString","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","minItems":2,"type":"array","items":{"anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}},"type":{"title":"Type","type":"string","const":"LineString"}},"description":"LineString Model"},"MultiLineString":{"title":"MultiLineString","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","minItems":1,"type":"array","items":{"minItems":2,"type":"array","items":{"anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}}},"type":{"title":"Type","type":"string","const":"MultiLineString"}},"description":"MultiLineString Model"},"MultiPoint":{"title":"MultiPoint","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","minItems":1,"type":"array","items":{"anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}},"type":{"title":"Type","type":"string","const":"MultiPoint"}},"description":"MultiPoint Model"},"MultiPolygon":{"title":"MultiPolygon","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","minItems":1,"type":"array","items":{"minItems":1,"type":"array","items":{"minItems":4,"type":"array","items":{"anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}}}},"type":{"title":"Type","type":"string","const":"MultiPolygon"}},"description":"MultiPolygon Model"},"Point":{"title":"Point","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]},"type":{"title":"Type","type":"string","const":"Point"}},"description":"Point Model"},"Polygon":{"title":"Polygon","required":["coordinates"],"type":"object","properties":{"coordinates":{"title":"Coordinates","minItems":1,"type":"array","items":{"minItems":4,"type":"array","items":{"anyOf":[{"maxItems":2,"minItems":2,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]},{"maxItems":3,"minItems":3,"type":"array","items":[{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]},{"anyOf":[{"type":"number"},{"type":"integer"}]}]}]}}},"type":{"title":"Type","type":"string","const":"Polygon"}},"description":"Polygon Model"},"ValidationError":{"title":"ValidationError","required":["loc","msg","type"],"type":"object","properties":{"loc":{"title":"Location","type":"array","items":{"type":"string"}},"msg":{"title":"Message","type":"string"},"type":{"title":"Error Type","type":"string"}}}}}}