-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathswagger.json
94 lines (94 loc) · 2.09 KB
/
swagger.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
{
"swagger": "2.0",
"info": {
"version": "1.0.0",
"title": "Batch Geo Coding",
"description": "Get GeoJSON data for Locations(ISO:3166 compatible)",
"license": {
"name": "MIT",
"url": "https://opensource.org/licenses/MIT"
},
"contact": {
"name": "siddharth",
"email": "[email protected]",
"url": "https://www.siddharthjain.in/"
}
},
"host": "geocoding-api.vercel.app",
"basePath": "/",
"tags": [
{
"name": "Batch Geocoding",
"description": "API for getting geojson from geolocations"
}
],
"schemes": ["https"],
"consumes": ["application/json"],
"produces": ["application/json"],
"paths": {
"/batch-geocode": {
"post": {
"tags": ["GeoJSON"],
"summary": "Get geojson for list of geolocations",
"parameters": [
{
"name": "geo_locations",
"type": "array",
"in": "body",
"description": "array of geolocation in ISO:3166 format or full name"
}
],
"produces": ["application/json"],
"responses": {
"200": {
"description": "ok",
"schema": {
"$ref": "#/definitions/GeoJSON"
}
}
}
}
}
},
"definitions": {
"GeoJSON": {
"required": [
"iso_name",
"full_name",
"geojson",
"created_at",
"updated_at"
],
"properties": {
"iso_name": {
"type": "string",
"uniqueItems": true
},
"full_name": {
"type": "string"
},
"geojson": {
"type": "object",
"items": {
"type": "string",
"geometry": {
"type": "string",
"coordinates": "array"
},
"properties": {
"name": "string"
}
}
},
"created_at": {
"type": "string",
"format": "date"
},
"updated_at": {
"type": "string",
"format": "date"
}
}
}
}
}