You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

129 lines
3.2 KiB

{
"name": "GET /place",
"endpoint": "place",
"priorityThresh": 1,
"tests": [
{
"id": 1,
"status": "pass",
"description": "place endpoint should return the desired record",
"in": {
"ids": "openstreetmap:venue:node:2562438641"
},
"expected": {
"properties": [
{
"gid": "openstreetmap:venue:node:2562438641",
"layer": "venue",
"source": "openstreetmap",
"id": "node:2562438641"
}
]
}
},
{
"id": 2,
"status": "pass",
"issue": "https://github.com/pelias/api/issues/441",
"description": "shortened source name should also work",
"in": {
"ids": "osm:venue:node:2562438641"
},
"expected": {
"properties": [
{
"gid": "openstreetmap:venue:node:2562438641",
"layer": "venue",
"source": "openstreetmap",
"id": "node:2562438641"
}
]
}
},
{
"id": 3,
"status": "pass",
"description": "the correct OSM way should be returned even when there is an OSM node with the same ID",
"issue": "https://github.com/pelias/api/issues/317",
"in": {
"ids": "openstreetmap:venue:way:5013364"
},
"expected": {
"properties": [
{
"gid": "openstreetmap:venue:way:5013364",
"layer": "venue",
"source": "openstreetmap",
"id": "way:5013364"
}
]
}
},
{
"id": 4,
"status": "pass",
"description": "the place endpoint should return multiple results when multiple ids are specified",
"in": {
"ids": "whosonfirst:region:85688525,whosonfirst:locality:101928027"
},
"expected": {
"priorityThresh": 2,
"properties": [
{
"gid": "whosonfirst:region:85688525",
"layer": "region",
"source": "whosonfirst",
"id": "85688525",
"name": "North Dakota"
},
{
"gid": "whosonfirst:locality:101928027",
"layer": "locality",
"source": "whosonfirst",
"id": "101928027",
"name": "Cape Town"
}
]
}
},
{
"id": 5,
"status": "pass",
"description": "Records from other layers should not be returned",
"issue": "https://github.com/pelias/pelias/issues/643",
"in": {
"ids": "openstreetmap:address:node:2420772655"
},
"expected": {
"properties": [
{
"gid": "openstreetmap:address:node:2420772655",
"layer": "address",
"source": "openstreetmap",
"id": "node:2420772655"
}
]
}
},
{
"id": 6,
"status": "fail",
"description": "Records from other sources should not be returned",
"issue": "https://github.com/pelias/pelias/issues/672",
"in": {
"ids": "whosonfirst:locality:123"
},
"unexpected": {
"properties": [
{
"gid": "geonames:locality:123",
"layer": "locality",
"source": "geonames",
"id": "123"
}
]
}
}
]
}