]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/api/details/params.feature
release 5.1.0.post5
[nominatim.git] / test / bdd / features / api / details / params.feature
1 Feature: Object details
2     Testing different parameter options for details API.
3
4     Scenario: Basic details
5         When sending v1/details
6           | osmtype | osmid |
7           | W       | 297699560 |
8         Then a HTTP 200 is returned
9         And the result is valid json
10         And the result has attributes geometry
11         And the result has no attributes keywords,address,linked_places,parentof
12         And the result contains
13             | geometry+type  |
14             | Point |
15
16     Scenario: Basic details with pretty printing
17         When sending v1/details
18           | osmtype | osmid     | pretty |
19           | W       | 297699560 | 1      |
20         Then a HTTP 200 is returned
21         And the result is valid json
22         And the result has attributes geometry
23         And the result has no attributes keywords,address,linked_places,parentof
24
25     Scenario: Details with addressdetails
26         When sending v1/details
27           | osmtype | osmid     | addressdetails |
28           | W       | 297699560 | 1              |
29         Then a HTTP 200 is returned
30         And the result is valid json
31         And the result has attributes address
32
33     Scenario: Details with linkedplaces
34         When sending v1/details
35           | osmtype | osmid  | linkedplaces |
36           | R       | 123924 | 1            |
37         Then a HTTP 200 is returned
38         And the result is valid json
39         And the result has attributes linked_places
40
41     Scenario: Details with hierarchy
42         When sending v1/details
43           | osmtype | osmid     | hierarchy |
44           | W       | 297699560 | 1         |
45         Then a HTTP 200 is returned
46         And the result is valid json
47         And the result has attributes hierarchy
48
49     Scenario: Details with grouped hierarchy
50         When sending v1/details
51           | osmtype | osmid     | hierarchy | group_hierarchy |
52           | W       | 297699560 | 1         | 1               |
53         Then a HTTP 200 is returned
54         And the result is valid json
55         And the result has attributes hierarchy
56
57     Scenario Outline: Details with keywords
58         When sending v1/details
59             | osmtype | osmid | keywords |
60             | <type>  | <id>  | 1 |
61         Then a HTTP 200 is returned
62         Then the result is valid json
63         And the result has attributes keywords
64
65     Examples:
66       | type | id |
67       | W    | 297699560 |
68       | W    | 243055645 |
69       | W    | 243055716 |
70       | W    | 43327921  |
71
72     # ticket #1343
73     Scenario: Details of a country with keywords
74         When sending v1/details
75             | osmtype | osmid   | keywords |
76             | R       | 1155955 | 1 |
77         Then a HTTP 200 is returned
78         And the result is valid json
79         And the result has attributes keywords
80
81     Scenario Outline: Details with full geometry
82         When sending v1/details
83             | osmtype | osmid | polygon_geojson |
84             | <type>  | <id>  | 1 |
85         Then a HTTP 200 is returned
86         And the result is valid json
87         And the result has attributes geometry
88         And the result contains
89             | geometry+type |
90             | <geometry> |
91
92     Examples:
93             | type | id        | geometry   |
94             | W    | 297699560 | LineString |
95             | W    | 243055645 | Polygon    |
96             | W    | 243055716 | Polygon    |
97             | W    | 43327921  | LineString |
98
99