]> git.openstreetmap.org Git - nominatim.git/blob - test/bdd/features/api/details/params.feature
Update entrances schema
[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 entrances
34         When sending v1/details
35           | osmtype | osmid     | entrances |
36           | W       | 429210603 | 1         |
37         Then a HTTP 200 is returned
38         And the result is valid json
39         And the result has attributes entrances
40
41     Scenario: Details with linkedplaces
42         When sending v1/details
43           | osmtype | osmid  | linkedplaces |
44           | R       | 123924 | 1            |
45         Then a HTTP 200 is returned
46         And the result is valid json
47         And the result has attributes linked_places
48
49     Scenario: Details with hierarchy
50         When sending v1/details
51           | osmtype | osmid     | hierarchy |
52           | W       | 297699560 | 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: Details with grouped hierarchy
58         When sending v1/details
59           | osmtype | osmid     | hierarchy | group_hierarchy |
60           | W       | 297699560 | 1         | 1               |
61         Then a HTTP 200 is returned
62         And the result is valid json
63         And the result has attributes hierarchy
64
65     Scenario Outline: Details with keywords
66         When sending v1/details
67             | osmtype | osmid | keywords |
68             | <type>  | <id>  | 1 |
69         Then a HTTP 200 is returned
70         Then the result is valid json
71         And the result has attributes keywords
72
73     Examples:
74       | type | id |
75       | W    | 297699560 |
76       | W    | 243055645 |
77       | W    | 243055716 |
78       | W    | 43327921  |
79
80     # ticket #1343
81     Scenario: Details of a country with keywords
82         When sending v1/details
83             | osmtype | osmid   | keywords |
84             | R       | 1155955 | 1 |
85         Then a HTTP 200 is returned
86         And the result is valid json
87         And the result has attributes keywords
88
89     Scenario Outline: Details with full geometry
90         When sending v1/details
91             | osmtype | osmid | polygon_geojson |
92             | <type>  | <id>  | 1 |
93         Then a HTTP 200 is returned
94         And the result is valid json
95         And the result has attributes geometry
96         And the result contains
97             | geometry+type |
98             | <geometry> |
99
100     Examples:
101             | type | id        | geometry   |
102             | W    | 297699560 | LineString |
103             | W    | 243055645 | Polygon    |
104             | W    | 243055716 | Polygon    |
105             | W    | 43327921  | LineString |
106
107