Skip to content

Commit

Permalink
doc and example fixes (#21558)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
davsta90 committed Nov 17, 2022
1 parent 662b1f9 commit bd9e03a
Show file tree
Hide file tree
Showing 3 changed files with 156 additions and 29 deletions.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
{
"parameters": {
"geography": "us",
"api-version": "2022-09-01-preview",
"routesetId": "[routeset-Id]",
"facilityId": "[facility-Id]",
"fromPoint": "47.652882287901065,-122.13400410050512",
"fromLevel": "-1",
"toPoint": "47.652870534630466,-122.13382884389553",
"toLevel": "0"
},
"responses": {
"200": {
"body": {
"noResultExplanation": "NoExplanation",
"paths": [
{
"lengthInMeters": 51.27548,
"timeInSeconds": 60,
"legs": [
{
"mode": "Default",
"lengthInMeters": 14.7605,
"timeInSeconds": 15,
"startLevel": 0,
"endLevel": 0,
"points": [
{
"latitude": 47.6528823,
"longitude": -122.1340041
},
{
"latitude": 47.6528688,
"longitude": -122.1340336
},
{
"latitude": 47.6528591,
"longitude": -122.1340534
},
{
"latitude": 47.6528309,
"longitude": -122.1341107
},
{
"latitude": 47.6527984,
"longitude": -122.1341556
}
]
},
{
"mode": "Stair",
"lengthInMeters": 7.88608,
"timeInSeconds": 16,
"startLevel": 0,
"endLevel": 1,
"points": [
{
"latitude": 47.6527984,
"longitude": -122.1341556
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
}
]
},
{
"mode": "Default",
"lengthInMeters": 28.6289,
"timeInSeconds": 29,
"startLevel": 1,
"endLevel": 1,
"points": [
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527843,
"longitude": -122.1341395
},
{
"latitude": 47.6527846,
"longitude": -122.1341332
},
{
"latitude": 47.652789,
"longitude": -122.1341315
},
{
"latitude": 47.6527898,
"longitude": -122.1341312
},
{
"latitude": 47.6527913,
"longitude": -122.1341306
},
{
"latitude": 47.6527938,
"longitude": -122.1341295
},
{
"latitude": 47.6528309,
"longitude": -122.1341137
},
{
"latitude": 47.652856,
"longitude": -122.1340564
},
{
"latitude": 47.6528694,
"longitude": -122.1340372
},
{
"latitude": 47.652873,
"longitude": -122.1339296
},
{
"latitude": 47.6528735,
"longitude": -122.1339124
},
{
"latitude": 47.6528733,
"longitude": -122.1339095
},
{
"latitude": 47.6528732,
"longitude": -122.1338288
}
]
}
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -137,14 +137,17 @@
"enum": [
"NoExplanation"
],
"x-ms_enum": {
"name": "noResultExplanation",
"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.",
"x-ms-enum": {
"name": "NoResultExplanation",
"modelAsString": true,
"values": [
"NoExplanation"
],
"modelAsString": true
}
{
"value": "NoExplanation",
"description": "Default value provided when a result is returned or it wasn't possible to determine why a path wasn't found."
}
]
},
"readOnly": true
},
"paths": {
"description": "An array of wayfinding path results. An empty array will be returned if no results were found.",
Expand Down Expand Up @@ -219,17 +222,16 @@
},
"AvoidFeatures": {
"name": "avoidFeatures",
"description": "To avoid certain types of connectors in the resulting path. Multiple comma separated values can be selected.",
"description": "To avoid certain types of connectors in the resulting path. Multiple values can be specified.",
"type": "array",
"items": {
"type": "string",
"enum": [
"stairs",
"elevators"
],
"x-ms_enum": {
"x-ms-enum": {
"name": "avoidFeatures",
"description": "To avoid certain types of connectors in the resulting path.",
"values": [
"stairs",
"elevators"
Expand All @@ -242,7 +244,7 @@
},
"MinWidth": {
"name": "minWidth",
"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.",
"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.",
"type": "number",
"in": "query",
"default": "0.0",
Expand All @@ -256,7 +258,7 @@
"operationId": "Wayfinding_GetPath",
"x-ms-examples": {
"Get the shortest path between two points in the facility.": {
"$ref": "./examples/wayfind/Wayfind_GetPath.json"
"$ref": "./examples/wayfind/Wayfinding_GetPath.json"
}
},
"parameters": [
Expand Down

0 comments on commit bd9e03a

Please sign in to comment.