Skip to content

Commit eb177f2

Browse files
davsta90kayousef
authored andcommitted
doc and example fixes (Azure#21558)
* doc and example fixes * Prettier whitespace changes * trying to fix Newtonsoft.Json.JsonSerializationException: Error converting value NoExplanation to type 'System.Collections.Generic.Dictionary * attempting to fix validaiton errors * attempting to fix validaiton errors
1 parent 80d7b4f commit eb177f2

File tree

3 files changed

+156
-29
lines changed

3 files changed

+156
-29
lines changed

specification/maps/data-plane/Creator/preview/2022-09-01-preview/examples/wayfind/Wayfind_GetPath.json

Lines changed: 0 additions & 17 deletions
This file was deleted.
Lines changed: 142 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,142 @@
1+
{
2+
"parameters": {
3+
"geography": "us",
4+
"api-version": "2022-09-01-preview",
5+
"routesetId": "[routeset-Id]",
6+
"facilityId": "[facility-Id]",
7+
"fromPoint": "47.652882287901065,-122.13400410050512",
8+
"fromLevel": "-1",
9+
"toPoint": "47.652870534630466,-122.13382884389553",
10+
"toLevel": "0"
11+
},
12+
"responses": {
13+
"200": {
14+
"body": {
15+
"noResultExplanation": "NoExplanation",
16+
"paths": [
17+
{
18+
"lengthInMeters": 51.27548,
19+
"timeInSeconds": 60,
20+
"legs": [
21+
{
22+
"mode": "Default",
23+
"lengthInMeters": 14.7605,
24+
"timeInSeconds": 15,
25+
"startLevel": 0,
26+
"endLevel": 0,
27+
"points": [
28+
{
29+
"latitude": 47.6528823,
30+
"longitude": -122.1340041
31+
},
32+
{
33+
"latitude": 47.6528688,
34+
"longitude": -122.1340336
35+
},
36+
{
37+
"latitude": 47.6528591,
38+
"longitude": -122.1340534
39+
},
40+
{
41+
"latitude": 47.6528309,
42+
"longitude": -122.1341107
43+
},
44+
{
45+
"latitude": 47.6527984,
46+
"longitude": -122.1341556
47+
}
48+
]
49+
},
50+
{
51+
"mode": "Stair",
52+
"lengthInMeters": 7.88608,
53+
"timeInSeconds": 16,
54+
"startLevel": 0,
55+
"endLevel": 1,
56+
"points": [
57+
{
58+
"latitude": 47.6527984,
59+
"longitude": -122.1341556
60+
},
61+
{
62+
"latitude": 47.6527843,
63+
"longitude": -122.1341395
64+
}
65+
]
66+
},
67+
{
68+
"mode": "Default",
69+
"lengthInMeters": 28.6289,
70+
"timeInSeconds": 29,
71+
"startLevel": 1,
72+
"endLevel": 1,
73+
"points": [
74+
{
75+
"latitude": 47.6527843,
76+
"longitude": -122.1341395
77+
},
78+
{
79+
"latitude": 47.6527843,
80+
"longitude": -122.1341395
81+
},
82+
{
83+
"latitude": 47.6527843,
84+
"longitude": -122.1341395
85+
},
86+
{
87+
"latitude": 47.6527846,
88+
"longitude": -122.1341332
89+
},
90+
{
91+
"latitude": 47.652789,
92+
"longitude": -122.1341315
93+
},
94+
{
95+
"latitude": 47.6527898,
96+
"longitude": -122.1341312
97+
},
98+
{
99+
"latitude": 47.6527913,
100+
"longitude": -122.1341306
101+
},
102+
{
103+
"latitude": 47.6527938,
104+
"longitude": -122.1341295
105+
},
106+
{
107+
"latitude": 47.6528309,
108+
"longitude": -122.1341137
109+
},
110+
{
111+
"latitude": 47.652856,
112+
"longitude": -122.1340564
113+
},
114+
{
115+
"latitude": 47.6528694,
116+
"longitude": -122.1340372
117+
},
118+
{
119+
"latitude": 47.652873,
120+
"longitude": -122.1339296
121+
},
122+
{
123+
"latitude": 47.6528735,
124+
"longitude": -122.1339124
125+
},
126+
{
127+
"latitude": 47.6528733,
128+
"longitude": -122.1339095
129+
},
130+
{
131+
"latitude": 47.6528732,
132+
"longitude": -122.1338288
133+
}
134+
]
135+
}
136+
]
137+
}
138+
]
139+
}
140+
}
141+
}
142+
}

specification/maps/data-plane/Creator/preview/2022-09-01-preview/wayfind.json

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -137,14 +137,17 @@
137137
"enum": [
138138
"NoExplanation"
139139
],
140-
"x-ms_enum": {
141-
"name": "noResultExplanation",
142-
"description": "In the event that no paths are found, the `paths` array will be empty. If the reason no paths were found can be determined, this property will provide an explanation why.",
140+
"x-ms-enum": {
141+
"name": "NoResultExplanation",
142+
"modelAsString": true,
143143
"values": [
144-
"NoExplanation"
145-
],
146-
"modelAsString": true
147-
}
144+
{
145+
"value": "NoExplanation",
146+
"description": "Default value provided when a result is returned or it wasn't possible to determine why a path wasn't found."
147+
}
148+
]
149+
},
150+
"readOnly": true
148151
},
149152
"paths": {
150153
"description": "An array of wayfinding path results. An empty array will be returned if no results were found.",
@@ -219,17 +222,16 @@
219222
},
220223
"AvoidFeatures": {
221224
"name": "avoidFeatures",
222-
"description": "To avoid certain types of connectors in the resulting path. Multiple comma separated values can be selected.",
225+
"description": "To avoid certain types of connectors in the resulting path. Multiple values can be specified.",
223226
"type": "array",
224227
"items": {
225228
"type": "string",
226229
"enum": [
227230
"stairs",
228231
"elevators"
229232
],
230-
"x-ms_enum": {
233+
"x-ms-enum": {
231234
"name": "avoidFeatures",
232-
"description": "To avoid certain types of connectors in the resulting path.",
233235
"values": [
234236
"stairs",
235237
"elevators"
@@ -242,7 +244,7 @@
242244
},
243245
"MinWidth": {
244246
"name": "minWidth",
245-
"description": "The minimum radius (in meters) of openings in the resulting path. For example, if you specified a minimum radius width of 0.5, the searched path will avoid openings less than 1 meters wide. Note: by using this value, the resulting path points will be buffered from walls and other vertical obstacles by the same distance.",
247+
"description": "The minimum width (in meters) of openings in the resulting path. For example, if you specified a minimum width of 0.5, the searched path will avoid openings less than 0.5 meters wide. Note: by using this value, the resulting path points will be buffered from walls and other vertical obstacles by half of the distance provided.",
246248
"type": "number",
247249
"in": "query",
248250
"default": "0.0",
@@ -256,7 +258,7 @@
256258
"operationId": "Wayfinding_GetPath",
257259
"x-ms-examples": {
258260
"Get the shortest path between two points in the facility.": {
259-
"$ref": "./examples/wayfind/Wayfind_GetPath.json"
261+
"$ref": "./examples/wayfind/Wayfinding_GetPath.json"
260262
}
261263
},
262264
"parameters": [

0 commit comments

Comments
 (0)