Skip to content

Commit

Permalink
[Maps - RevGeoCoding] Add version preview/2022-12-01-preview [Hub Gen…
Browse files Browse the repository at this point in the history
…erated] (#19951)

* Adds base for updating Search from version preview/2022-02-01-preview to version 2022-09-01-preview

* Updates readme

* Updates API version in new specs and examples

* 2022/07/26 Add new version swagger for RevGC

* 2022/07/27 Update description

* 2022/08/03 Add batch RevGC api

* 2022/08/04 Change batch operationId to Post

* 2022/08/04 Change pickType to matchedType

* 2022/08/04 Add preview warning and change latlng order

* 2022/08/05 Update operationId

* 2022/08/09 Change status code for partial failure in batch api

* 2022/08/09 Use array for matchedType

* 2022/08/10 Add optional id to the batch example

* 2022/08/10 Add enum for matchedType

* 2022/08/11 Change point to query

* 2022/08/22 Update matchedType to matchTypes

* 2022/08/22 Update batch api path

* 2022/08/22 Add geoJsonData and move nextLink

* 2022/08/22 Remove the description of the case of multiple entities are returned

* 2022/08/22 Add matchTypes in the example query

* 2022/08/22 Update error in batch api examples

* 2022/08/22 Update description for 207 batch response

* 2022/08/22 Change content-type to Json

* 2022/08/24 Update entity type in the example

* 2022/08/24 Remove depulicated types in the description

* Revert "2022/08/22 Add geoJsonData and move nextLink"

This reverts commit f2ffa7b.

* Revert "2022/08/22 Change content-type to Json"

This reverts commit 0af80bb.

* 2022/09/27 Change MatchTypes to ResultTypes

* 2022/09/28 Change query to location in RevGC

* 2022/09/28 Add nextLink in batch response

* 2022/10/03 Add intersection in address

* 2022/10/03 Add type to the item of adminDistricts

* 2022/10/04 Update description for latlong pair

* 2022/10/04 Update GeoJson type

* 2022/10/04 Add query to forward batch input parameters

* 2022/10/04 Remove default api-version

* 2022/10/12 Change location to coordinates

* 2022/11/18 Add int type

* 2022/11/18 Add x-ms-enum for enums

* 2022/11/28 Remove except query and update url

* 2022/11/28 Update description for 207 response

* 2022/12/01 Update description for query

* 2022/12/08 Fix operationId

* 2023/01/05 Upgrade api-version to 2022-12-01-preview

* 2023/01/06 Copy swagger file and examples from 2022-09-01

* 2023/01/06 Update examples

* 2023/01/10 Update swagger file

* 2023/01/10 Update swagger file and examples

* 2023/01/10 Update readme.md

* 2023/01/11 Update resultTypes

* 2023/01/12 Update adminDistrict for RevGC

Co-authored-by: John Lai <[email protected]>
  • Loading branch information
john35452 and John Lai authored Jan 19, 2023
1 parent 13d172c commit 3f5515a
Showing 10 changed files with 2,898 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
{
"parameters": {
"api-version": "2022-12-01-preview",
"addressLine": "15127 NE 24th Street",
"locality": "Redmond",
"adminDistrict": "WA",
"AzureKey": "[subscription-key]"
},
"responses": {
"200": {
"headers": {
"Content-Type": "application/geo+json"
},
"body": {
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "15127 NE 24th St, Redmond, WA 98052",
"locality": "Redmond",
"postalCode": "98052",
"addressLine": "15127 NE 24th St"
},
"type": "Address",
"confidence": "High",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.1386787,
47.6302179
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.138681,
47.630358
]
},
"bbox": [
-122.14632282407,
47.626495282429325,
-122.13103917593001,
47.63422071757068
]
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,258 @@
{
"parameters": {
"api-version": "2022-12-01-preview",
"AzureKey": "[subscription-key]",
"geocodingBatchRequestBody": {
"batchItems": [
{
"addressLine": "One, Microsoft Way, Redmond, WA 98052",
"top": 2,
"optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B"
},
{
"addressLine": "Pike Pl",
"adminDistrict": "WA",
"locality": "Seattle",
"top": 3
}
]
}
},
"responses": {
"200": {
"body": {
"summary": {
"successfulRequests": 2,
"totalRequests": 2
},
"batchItems": [
{
"optionalId": "4C3681A6C8AA4AC3441412763A2A25C81444DC8B",
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "1 Microsoft Way, Redmond, WA 98052",
"locality": "Redmond",
"postalCode": "98052",
"addressLine": "1 Microsoft Way"
},
"type": "Address",
"confidence": "Medium",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.128275,
47.639429
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.127028,
47.638545
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.128275,
47.639429
]
},
"bbox": [
-122.1359181505759,
47.63556628242932,
-122.1206318494241,
47.643291717570676
]
}
]
},
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"address": {
"countryRegion": {
"name": "United States"
},
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King County"
}
],
"formattedAddress": "Pike Pl, Seattle, WA 98101",
"locality": "Seattle",
"postalCode": "98101",
"addressLine": "Pike Pl"
},
"type": "RoadBlock",
"confidence": "High",
"matchCodes": [
"Good"
],
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.341979399674,
47.6095253501216
]
},
"calculationMethod": "Interpolation",
"usageTypes": [
"Display"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.341979399674,
47.6095253501216
]
},
"bbox": [
-122.34961817972945,
47.605662632550924,
-122.33434061961856,
47.61338806769228
]
}
]
}
]
}
},
"207": {
"body": {
"summary": {
"successfulRequests": 1,
"totalRequests": 2
},
"batchItems": [
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"properties": {
"type": "Address",
"confidence": "High",
"matchCodes": [
"Good"
],
"address": {
"locality": "Redmond",
"adminDistricts": [
{
"shortName": "WA"
},
{
"shortName": "King"
}
],
"countryRegion": {
"ISO": "US",
"name": "United States"
},
"postalCode": "98052",
"formattedAddress": "1 Microsoft Way, Redmond, WA 98052",
"addressLine": "1 Microsoft Way"
},
"geocodePoints": [
{
"geometry": {
"type": "Point",
"coordinates": [
-122.128275,
47.639429
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Display",
"Route"
]
},
{
"geometry": {
"type": "Point",
"coordinates": [
-122.127028,
47.638545
]
},
"calculationMethod": "Rooftop",
"usageTypes": [
"Route"
]
}
]
},
"geometry": {
"type": "Point",
"coordinates": [
-122.128275,
47.639429
]
},
"bbox": [
-122.1359181505759,
47.63556628242932,
-122.1206318494241,
47.643291717570676
]
}
]
},
{
"error": {
"code": "Conflicting Parameters",
"message": "When 'query' is present, only the following parameters are valid: 'bbox, location, view, top'. 'addressLine' was passed"
}
}
]
}
}
}
}
Loading

0 comments on commit 3f5515a

Please sign in to comment.