Skip to content

Commit 790f1c1

Browse files
sanil7777777LeiWang3
authored andcommitted
[Hub Generated] Review request for Microsoft.Maps/Microsoft.Maps to add version preview/2.0 (Azure#16706)
* added extra fields to JSON list data response in docs * added content-type field to request header * took out content type from header field due to errors; JSON reponse fields for user Data are ready to commit * added content-type header to userData update docs * added a change which fixed prettier check * changed name of enum * added reference to ContentType * trying to add contenttype to docs * adding content type header * trying to add content type header to userDate update docs * adding content type header to update docs * adding example parameter for new content-type request header * changed xs-parameter-location * trying to fix invalid type error * Trying to fix model error * trying new changes * Making final changes: added content type header * getting rid of content type header changes to work on a diff bug * added corresponding content types for dataFormat in upload preview * reverting changes due to unforseen model errors * adding dataFormats that correspond to content-type * was missing a quote * changed format of some wording * adding schema to swagger spec for 400 response for data upload preview * fixing changes * reverted changes * trying to remove body from response examples * adding schema to 400 response in data upload * reverting changes again * adding schema to 400 response in data upload * removed header from 400 response * adding schema * reverting all changes * trying changes * reverting again 2.0 * moving responses to directions section * semantic validation changes * fixing model val errors * fixing model val errors * got rid of model val errors * fixing prettier check errors * fixing another prettier check error * fixed error code response message * removing required properties * removing unneeded definitions * fixed prettier check issues again * deleted 200 response for data update (LRO) * got rid of headers * added header back for download 200 * added 200 response back to data update * added content type header into user update * fixing invalid type err * trying to fix invalid type * reverting content type header changes * adding header to 202 response
1 parent b1425e2 commit 790f1c1

File tree

3 files changed

+132
-97
lines changed

3 files changed

+132
-97
lines changed

specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/data.json

Lines changed: 125 additions & 90 deletions
Original file line numberDiff line numberDiff line change
@@ -56,65 +56,6 @@
5656
"SasToken": []
5757
}
5858
],
59-
"responses": {
60-
"400": {
61-
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
62-
"schema": {
63-
"$ref": "#/definitions/ODataErrorResponse"
64-
}
65-
},
66-
"401": {
67-
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
68-
"schema": {
69-
"$ref": "#/definitions/ODataErrorResponse"
70-
},
71-
"headers": {
72-
"WWW-Authenticate": {
73-
"type": "string",
74-
"description": "Bearer realm=\"https://atlas.microsoft.com/\", error=\"invalid_token\", error_description=\"The access token expired\""
75-
}
76-
}
77-
},
78-
"403": {
79-
"description": "Permission, capacity, or authentication issues.",
80-
"schema": {
81-
"$ref": "#/definitions/ODataErrorResponse"
82-
}
83-
},
84-
"404": {
85-
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
86-
"schema": {
87-
"$ref": "#/definitions/ODataErrorResponse"
88-
}
89-
},
90-
"500": {
91-
"description": "An error occurred while processing the request. Please try again later.",
92-
"schema": {
93-
"$ref": "#/definitions/ODataErrorResponse"
94-
}
95-
},
96-
"200Async": {
97-
"description": "The operation is running or complete. If the operation was successful, use the Resource-Location header to obtain the path to the result.",
98-
"schema": {
99-
"$ref": "#/definitions/LongRunningOperationResult"
100-
},
101-
"headers": {
102-
"Resource-Location": {
103-
"type": "string",
104-
"description": "If successful, a URI where details on the newly created resource can be found."
105-
}
106-
}
107-
},
108-
"202Accepted": {
109-
"description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Operation-Location Header to obtain status.",
110-
"headers": {
111-
"Operation-Location": {
112-
"type": "string",
113-
"description": "New URL to check for the results of the long running process."
114-
}
115-
}
116-
}
117-
},
11859
"parameters": {
11960
"GeographicResourceLocation": {
12061
"name": "geography",
@@ -249,7 +190,7 @@
249190
"/mapData": {
250191
"post": {
251192
"x-publish": true,
252-
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Data Upload API allows the caller to upload data content to the Azure Maps service.\nYou can use this API in a scenario like uploading a collection of Geofences in `GeoJSON` \nformat, for use in our [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial).\n\n## Submit Upload Request\n\nTo upload your content you will use a `POST` request. The request body will contain the data to upload. The `Content-Type` header will be set to the content type of the \ndata.\n\nFor example, to upload a collection of geofences in `GeoJSON` format, set the request body to the geofence \ncontent. Set the `dataFormat` query parameter to _geojson_, and set the `Content-Type` header to either one \nof the following media types:\n\n- `application/json`\n- `application/vnd.geo+json`\n- `application/octet-stream`\n\nHere's a sample request body for uploading a simple Geofence represented as a circle geometry using a center \npoint and a radius. The sample below is in `GeoJSON`:\n\n```json\n{\n \"type\": \"FeatureCollection\",\n \"features\": [{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [-122.126986, 47.639754]\n },\n \"properties\": {\n \"geometryId\": \"001\",\n \"radius\": 500\n }\n }]\n}\n```\n\nThe Data Upload API performs a \n[long-running request](https://aka.ms/am-creator-lrt-v2).\n\n## Data Upload Limits\n\nPlease, be aware that currently every Azure Maps account has a [data storage limit](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). \nOnce the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. \nYou can always use the [Data Delete API](https://docs.microsoft.com/rest/api/maps/data-v2/delete-preview) to \ndelete old/unused content and create space for new uploads.",
193+
"description": "**Applies to:** see pricing [tiers](https://aka.ms/AzureMapsPricingTier).\n\nThe Data Upload API allows the caller to upload data content to the Azure Maps service.\nYou can use this API in a scenario like uploading a collection of Geofences in `GeoJSON` \nformat, for use in our [Azure Maps Geofencing Service](https://docs.microsoft.com/rest/api/maps/spatial).\n\n## Submit Upload Request\n\nTo upload your content you will use a `POST` request. The request body will contain the data to upload. The `Content-Type` header will be set to the content type of the \ndata.\n\nFor example, to upload a collection of geofences in `GeoJSON` format, set the request body to the geofence \ncontent. Set the `dataFormat` query parameter to _geojson_, and set the `Content-Type` header to either one \nof the following media types:\n\n- `application/json` if `dataFormat` is `JSON`\n- `application/vnd.geo+json` if `dataFormat` is `geoJSON` \n- `application/octet-stream` if `dataFormat` is `zip`\n\nHere's a sample request body for uploading a simple Geofence represented as a circle geometry using a center \npoint and a radius. The sample below is in `GeoJSON`:\n\n```json\n{\n \"type\": \"FeatureCollection\",\n \"features\": [{\n \"type\": \"Feature\",\n \"geometry\": {\n \"type\": \"Point\",\n \"coordinates\": [-122.126986, 47.639754]\n },\n \"properties\": {\n \"geometryId\": \"001\",\n \"radius\": 500\n }\n }]\n}\n```\n\nThe Data Upload API performs a \n[long-running request](https://aka.ms/am-creator-lrt-v2).\n\n## Data Upload Limits\n\nPlease, be aware that currently every Azure Maps account has a [data storage limit](https://docs.microsoft.com/en-us/azure/azure-resource-manager/management/azure-subscription-service-limits#azure-maps-limits). \nOnce the storage limit is reached, all the new upload API calls will return a `409 Conflict` http error response. \nYou can always use the [Data Delete API](https://docs.microsoft.com/rest/api/maps/data-v2/delete-preview) to \ndelete old/unused content and create space for new uploads.",
253194
"operationId": "Data_UploadPreview",
254195
"x-ms-long-running-operation": true,
255196
"x-ms-long-running-operation-options": {
@@ -294,22 +235,43 @@
294235
}
295236
},
296237
"202": {
297-
"$ref": "#/responses/202Accepted"
238+
"description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Operation-Location Header to obtain status.",
239+
"headers": {
240+
"Operation-Location": {
241+
"type": "string",
242+
"description": "New URL to check for the results of the long running process."
243+
}
244+
}
298245
},
299246
"400": {
300-
"$ref": "#/responses/400"
247+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
248+
"schema": {
249+
"$ref": "#/definitions/ODataErrorResponse"
250+
}
301251
},
302252
"401": {
303-
"$ref": "#/responses/401"
253+
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
254+
"schema": {
255+
"$ref": "#/definitions/ODataErrorResponse"
256+
}
304257
},
305258
"403": {
306-
"$ref": "#/responses/403"
259+
"description": "Permission, capacity, or authentication issues.",
260+
"schema": {
261+
"$ref": "#/definitions/ODataErrorResponse"
262+
}
307263
},
308264
"404": {
309-
"$ref": "#/responses/404"
265+
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
266+
"schema": {
267+
"$ref": "#/definitions/ODataErrorResponse"
268+
}
310269
},
311270
"500": {
312-
"$ref": "#/responses/500"
271+
"description": "An error occurred while processing the request. Please try again later.",
272+
"schema": {
273+
"$ref": "#/definitions/ODataErrorResponse"
274+
}
313275
}
314276
}
315277
},
@@ -347,19 +309,34 @@
347309
}
348310
},
349311
"400": {
350-
"$ref": "#/responses/400"
312+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
313+
"schema": {
314+
"$ref": "#/definitions/ODataErrorResponse"
315+
}
351316
},
352317
"401": {
353-
"$ref": "#/responses/401"
318+
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
319+
"schema": {
320+
"$ref": "#/definitions/ODataErrorResponse"
321+
}
354322
},
355323
"403": {
356-
"$ref": "#/responses/403"
324+
"description": "Permission, capacity, or authentication issues.",
325+
"schema": {
326+
"$ref": "#/definitions/ODataErrorResponse"
327+
}
357328
},
358329
"404": {
359-
"$ref": "#/responses/404"
330+
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
331+
"schema": {
332+
"$ref": "#/definitions/ODataErrorResponse"
333+
}
360334
},
361335
"500": {
362-
"$ref": "#/responses/500"
336+
"description": "An error occurred while processing the request. Please try again later.",
337+
"schema": {
338+
"$ref": "#/definitions/ODataErrorResponse"
339+
}
363340
}
364341
}
365342
}
@@ -412,22 +389,43 @@
412389
}
413390
},
414391
"202": {
415-
"$ref": "#/responses/202Accepted"
392+
"description": "Request Accepted: The request has been accepted for processing. Please use the URL in the Operation-Location Header to obtain status.",
393+
"headers": {
394+
"Operation-Location": {
395+
"type": "string",
396+
"description": "New URL to check for the results of the long running process."
397+
}
398+
}
416399
},
417400
"400": {
418-
"$ref": "#/responses/400"
401+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
402+
"schema": {
403+
"$ref": "#/definitions/ODataErrorResponse"
404+
}
419405
},
420406
"401": {
421-
"$ref": "#/responses/401"
407+
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
408+
"schema": {
409+
"$ref": "#/definitions/ODataErrorResponse"
410+
}
422411
},
423412
"403": {
424-
"$ref": "#/responses/403"
413+
"description": "Permission, capacity, or authentication issues.",
414+
"schema": {
415+
"$ref": "#/definitions/ODataErrorResponse"
416+
}
425417
},
426418
"404": {
427-
"$ref": "#/responses/404"
419+
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
420+
"schema": {
421+
"$ref": "#/definitions/ODataErrorResponse"
422+
}
428423
},
429424
"500": {
430-
"$ref": "#/responses/500"
425+
"description": "An error occurred while processing the request. Please try again later.",
426+
"schema": {
427+
"$ref": "#/definitions/ODataErrorResponse"
428+
}
431429
}
432430
}
433431
},
@@ -468,19 +466,34 @@
468466
}
469467
},
470468
"400": {
471-
"$ref": "#/responses/400"
469+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
470+
"schema": {
471+
"$ref": "#/definitions/ODataErrorResponse"
472+
}
472473
},
473474
"401": {
474-
"$ref": "#/responses/401"
475+
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
476+
"schema": {
477+
"$ref": "#/definitions/ODataErrorResponse"
478+
}
475479
},
476480
"403": {
477-
"$ref": "#/responses/403"
481+
"description": "Permission, capacity, or authentication issues.",
482+
"schema": {
483+
"$ref": "#/definitions/ODataErrorResponse"
484+
}
478485
},
479486
"404": {
480-
"$ref": "#/responses/404"
487+
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
488+
"schema": {
489+
"$ref": "#/definitions/ODataErrorResponse"
490+
}
481491
},
482492
"500": {
483-
"$ref": "#/responses/500"
493+
"description": "An error occurred while processing the request. Please try again later.",
494+
"schema": {
495+
"$ref": "#/definitions/ODataErrorResponse"
496+
}
484497
}
485498
}
486499
},
@@ -512,19 +525,34 @@
512525
"description": "Data delete request completed successfully. The content for `udid` was deleted on the server."
513526
},
514527
"400": {
515-
"$ref": "#/responses/400"
528+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
529+
"schema": {
530+
"$ref": "#/definitions/ODataErrorResponse"
531+
}
516532
},
517533
"401": {
518-
"$ref": "#/responses/401"
534+
"description": "Access denied due to invalid subscription key or invalid Azure Active Directory (Azure AD) bearer token. Make sure to provide a valid key for an active Azure subscription and Maps resource. Otherwise, verify the [WWW-Authenticate](https://tools.ietf.org/html/rfc6750#section-3.1) header for error code and description of the provided Azure AD bearer token.",
535+
"schema": {
536+
"$ref": "#/definitions/ODataErrorResponse"
537+
}
519538
},
520539
"403": {
521-
"$ref": "#/responses/403"
540+
"description": "Permission, capacity, or authentication issues.",
541+
"schema": {
542+
"$ref": "#/definitions/ODataErrorResponse"
543+
}
522544
},
523545
"404": {
524-
"$ref": "#/responses/404"
546+
"description": "Not Found: the requested resource could not be found, but it may be available again in the future.",
547+
"schema": {
548+
"$ref": "#/definitions/ODataErrorResponse"
549+
}
525550
},
526551
"500": {
527-
"$ref": "#/responses/500"
552+
"description": "An error occurred while processing the request. Please try again later.",
553+
"schema": {
554+
"$ref": "#/definitions/ODataErrorResponse"
555+
}
528556
}
529557
}
530558
}
@@ -554,10 +582,16 @@
554582
],
555583
"responses": {
556584
"200": {
557-
"$ref": "#/responses/200Async"
585+
"description": "The operation is running or complete. If the operation was successful, use the Resource-Location header to obtain the path to the result.",
586+
"schema": {
587+
"$ref": "#/definitions/LongRunningOperationResult"
588+
}
558589
},
559590
"400": {
560-
"$ref": "#/responses/400"
591+
"description": "Bad request: one or more parameters were incorrectly specified or are mutually exclusive.",
592+
"schema": {
593+
"$ref": "#/definitions/ODataErrorResponse"
594+
}
561595
}
562596
}
563597
}
@@ -656,7 +690,8 @@
656690
},
657691
"MapDataDownloadResponse": {
658692
"description": "The response model for the Data Download API. The response body will contain the content for the passed in `udid`.",
659-
"type": "object"
693+
"type": "object",
694+
"properties": {}
660695
},
661696
"MapDataListResponse": {
662697
"description": "The response model for the Data List API. Returns a list of all the previously uploaded data.",

specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Update.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,6 @@
2525
}
2626
},
2727
"responses": {
28-
"202": {
29-
"headers": {
30-
"Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0",
31-
"Access-Control-Expose-Headers": "Operation-Location"
32-
}
33-
},
3428
"200": {
3529
"headers": {},
3630
"body": {
@@ -40,6 +34,12 @@
4034
}
4135
}
4236
},
37+
"202": {
38+
"headers": {
39+
"Operation-Location": "https://us.atlas.microsoft.com/mapData/operations/{operationId}?api-version=1.0",
40+
"Access-Control-Expose-Headers": "Operation-Location"
41+
}
42+
},
4343
"400": {
4444
"headers": {},
4545
"body": {

specification/maps/data-plane/Microsoft.Maps/Data/preview/2.0/examples/Upload.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
"headers": {},
3636
"body": {
3737
"error": {
38-
"code": "400 Bad Request",
38+
"code": "400 BadRequest",
3939
"message": "Upload request failed. Your data has been removed as we encountered the following problems with it: Map data is not a valid GeoJSON geometry."
4040
}
4141
}

0 commit comments

Comments
 (0)