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