From 2fd11ee073ecd99e0829be961b95022b56a39fc2 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Wed, 24 Mar 2021 17:05:56 -0700 Subject: [PATCH 01/11] update API based on SDK team feedback --- .../v1.0-preview.1/TranslatorBatch.json | 117 +++++++++++++++--- 1 file changed, 103 insertions(+), 14 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 754fc38b80a1..bae7a035b5c6 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -108,7 +108,7 @@ "Document Translation" ], "summary": "Returns a list of batch requests submitted and the status for each request", - "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the subscription). The status for each request is sorted by id.\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top and $skip query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the resource).\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$sort query parameter can be used to sort the returned list (ex \"$sort=createdDateTimeUtc asc\" or \"$sort=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperations", "produces": [ "application/json" @@ -117,22 +117,61 @@ { "in": "query", "name": "$top", - "description": "Take the $top entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$top indicates the total number of records the user wants to be returned across all pages.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", - "default": 50, - "maximum": 100, - "minimum": 1 + "maximum": 2147483647, + "minimum": 0 }, { "in": "query", "name": "$skip", - "description": "Skip the $skip entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$skip indicates the number of records to skip from the list of records held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 + }, + { + "in": "query", + "name": "$maxpagesize", + "description": "$maxpagesize is the maximum items returned in the items in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "type": "integer", + "format": "int32", + "default": 50, + "maximum": 100, + "minimum": 1 + }, + { + "in": "query", + "name": "ids", + "description": "Ids to use in filtering", + "type": "string" + }, + { + "in": "query", + "name": "status", + "description": "Status to use in filtering", + "type": "string" + }, + { + "in": "query", + "name": "createdDateTimeUtcStart", + "description": "the start datetime to get items after", + "type": "string" + }, + { + "in": "query", + "name": "createdDateTimeUtcEnd", + "description": "the end datetime to get items before", + "type": "string" + }, + { + "in": "query", + "name": "$orderBy", + "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", + "type": "string" } ], "responses": { @@ -509,7 +548,7 @@ "Document Translation" ], "summary": "Returns the status for all documents in a batch document translation request", - "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nThe documents included in the response are sorted by document Id in descending order. If the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top and $skip query parameters can be used to specify a number of results to return and an offset for the collection.\r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nIf the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$sort query parameter can be used to sort the returned list (ex \"$sort=createdDateTimeUtc asc\" or \"$sort=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperationDocumentsStatus", "produces": [ "application/json" @@ -526,22 +565,61 @@ { "in": "query", "name": "$top", - "description": "Take the $top entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$top indicates the total number of records the user wants to be returned across all pages.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", - "default": 50, - "maximum": 100, - "minimum": 1 + "maximum": 2147483647, + "minimum": 0 }, { "in": "query", "name": "$skip", - "description": "Skip the $skip entries in the collection\r\nWhen both $top and $skip are supplied, $skip is applied first", + "description": "$skip indicates the number of records to skip from the list of records held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n \r\nClients MAY use $top and $skip query parameters to specify a number of results to return and an offset into the collection.\r\nWhen both $top and $skip are given by a client, the server SHOULD first apply $skip and then $top on the collection.\r\n \r\nNote: If the server can't honor $top and/or $skip, the server MUST return an error to the client informing about it instead of just ignoring the query options.", "type": "integer", "format": "int32", "default": 0, "maximum": 2147483647, "minimum": 0 + }, + { + "in": "query", + "name": "$maxpagesize", + "description": "$maxpagesize is the maximum items returned in the items in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "type": "integer", + "format": "int32", + "default": 50, + "maximum": 100, + "minimum": 1 + }, + { + "in": "query", + "name": "ids", + "description": "Ids to use in filtering", + "type": "string" + }, + { + "in": "query", + "name": "status", + "description": "Status to use in filtering", + "type": "string" + }, + { + "in": "query", + "name": "createdDateTimeUtcStart", + "description": "the start datetime to get items after", + "type": "string" + }, + { + "in": "query", + "name": "createdDateTimeUtcEnd", + "description": "the end datetime to get items before", + "type": "string" + }, + { + "in": "query", + "name": "$orderBy", + "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", + "type": "string" } ], "responses": { @@ -863,6 +941,7 @@ "Glossary": { "description": "Glossary / translation memory for the request", "required": [ + "format", "glossaryUrl" ], "type": "object", @@ -878,7 +957,7 @@ "example": "XLIFF" }, "version": { - "description": "Version", + "description": "Optional Version. If not specified, default is used.", "type": "string", "example": "2.0" }, @@ -1090,6 +1169,7 @@ "ErrorV2": { "description": "This contains an outer error with error code, message, details, target and an inner error with more descriptive details.", "required": [ + "code", "message" ], "type": "object", @@ -1232,8 +1312,8 @@ "createdDateTimeUtc", "id", "lastActionDateTimeUtc", - "path", "progress", + "sourcePath", "status", "to" ], @@ -1244,6 +1324,11 @@ "type": "string", "example": "https://myblob.blob.core.windows.net/mycontainer/fr/mydoc.txt" }, + "sourcePath": { + "description": "Location of the source document", + "type": "string", + "example": "https://myblob.blob.core.windows.net/mycontainer/fr/mydoc.txt" + }, "createdDateTimeUtc": { "format": "date-time", "description": "Operation created date time", @@ -1330,6 +1415,10 @@ "type": "string" } }, + "defaultVersion": { + "description": "Default version if none is specified", + "type": "string" + }, "versions": { "description": "Supported Version", "type": "array", From 09d59fa731fa0e71cfe1e51bd6a9466b8c2f6572 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Wed, 24 Mar 2021 20:33:09 -0700 Subject: [PATCH 02/11] update based on feedback --- .../v1.0-preview.1/TranslatorBatch.json | 34 +++++++++----- .../v1.0-preview.1/examples/document.json | 1 + .../v1.0-preview.1/examples/documents.json | 1 + .../v1.0-preview.1/examples/format.json | 45 +++++++------------ .../v1.0-preview.1/examples/operations.json | 2 +- 5 files changed, 40 insertions(+), 43 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index bae7a035b5c6..3228140061c5 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -108,7 +108,7 @@ "Document Translation" ], "summary": "Returns a list of batch requests submitted and the status for each request", - "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the resource).\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$sort query parameter can be used to sort the returned list (ex \"$sort=createdDateTimeUtc asc\" or \"$sort=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns a list of batch requests submitted and the status for each request.\r\nThis list only contains batch requests submitted by the user (based on the resource).\r\n \r\nIf the number of requests exceeds our paging limit, server-side paging is used. Paginated responses indicate a partial result and include a continuation token in the response.\r\nThe absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of batches based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled operations.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nThe server honors the values specified by the client. However, clients must be prepared to handle responses that contain a different page size or contain a continuation token.\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperations", "produces": [ "application/json" @@ -147,25 +147,30 @@ "in": "query", "name": "ids", "description": "Ids to use in filtering", - "type": "string" + "type": "array", + "items": { + "format": "uuid", + "type": "string" + } }, { "in": "query", "name": "status", - "description": "Status to use in filtering", - "type": "string" + "description": "Status to use in filtering" }, { "in": "query", "name": "createdDateTimeUtcStart", "description": "the start datetime to get items after", - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", "name": "createdDateTimeUtcEnd", "description": "the end datetime to get items before", - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", @@ -548,7 +553,7 @@ "Document Translation" ], "summary": "Returns the status for all documents in a batch document translation request", - "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nIf the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$sort query parameter can be used to sort the returned list (ex \"$sort=createdDateTimeUtc asc\" or \"$sort=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", + "description": "Returns the status for all documents in a batch document translation request.\r\n \r\nIf the number of documents in the response exceeds our paging limit, server-side paging is used.\r\nPaginated responses indicate a partial result and include a continuation token in the response. The absence of a continuation token means that no additional pages are available.\r\n \r\n$top, $skip and $maxpagesize query parameters can be used to specify a number of results to return and an offset for the collection.\r\n \r\n$top indicates the total number of records the user wants to be returned across all pages.\r\n$skip indicates the number of records to skip from the list of document status held by the server based on the sorting method specified. By default, we sort by descending start time.\r\n$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\n$orderBy query parameter can be used to sort the returned list (ex \"$orderBy=createdDateTimeUtc asc\" or \"$orderBy=createdDateTimeUtc desc\").\r\nThe default sorting is descending by createdDateTimeUtc.\r\nSome query parameters can be used to filter the returned list (ex: \"status=Succeeded,Cancelled\") will only return succeeded and cancelled documents.\r\ncreatedDateTimeUtcStart and createdDateTimeUtcEnd can be used combined or separately to specify a range of datetime to filter the returned list by.\r\nThe supported filtering query parameters are (status, ids, createdDateTimeUtcStart, createdDateTimeUtcEnd).\r\n \r\nWhen both $top and $skip are included, the server should first apply $skip and then $top on the collection.\r\nNote: If the server can't honor $top and/or $skip, the server must return an error to the client informing about it instead of just ignoring the query options.\r\nThis reduces the risk of the client making assumptions about the data returned.", "operationId": "DocumentTranslation_GetOperationDocumentsStatus", "produces": [ "application/json" @@ -595,25 +600,30 @@ "in": "query", "name": "ids", "description": "Ids to use in filtering", - "type": "string" + "type": "array", + "items": { + "format": "uuid", + "type": "string" + } }, { "in": "query", "name": "status", - "description": "Status to use in filtering", - "type": "string" + "description": "Status to use in filtering" }, { "in": "query", "name": "createdDateTimeUtcStart", "description": "the start datetime to get items after", - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", "name": "createdDateTimeUtcEnd", "description": "the end datetime to get items before", - "type": "string" + "type": "string", + "format": "date-time" }, { "in": "query", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json index f5f45731270f..76c2ce7ddd20 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/document.json @@ -86,6 +86,7 @@ }, "body": { "path": "https://myblob.blob.core.windows.net/destinationContainer/fr/mydoc.txt", + "sourcePath": "https://myblob.blob.core.windows.net/sourceContainer/fr/mydoc.txt", "createdDateTimeUtc": "2020-03-26T00:00:00Z", "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", "status": "Running", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index c92c6b7ecd02..8b9743d2f711 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -89,6 +89,7 @@ "value": [ { "path": "https://myblob.blob.core.windows.net/destinationContainer/fr/mydoc.txt", + "sourcePath": "https://myblob.blob.core.windows.net/sourceContainer/fr/mydoc.txt", "createdDateTimeUtc": "2020-03-26T00:00:00Z", "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", "status": "Running", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json index fe48785fe1ae..01233805287f 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json @@ -59,8 +59,7 @@ ], "contentTypes": [ "text/plain" - ], - "versions": [] + ] }, { "format": "PortableDocumentFormat", @@ -69,8 +68,16 @@ ], "contentTypes": [ "application/pdf" + ] + }, + { + "format": "OpenXmlWord", + "fileExtensions": [ + ".docx" ], - "versions": [] + "contentTypes": [ + "application/vnd.openxmlformats-officedocument.wordprocessingml.document" + ] }, { "format": "OpenXmlPresentation", @@ -79,8 +86,7 @@ ], "contentTypes": [ "application/vnd.openxmlformats-officedocument.presentationml.presentation" - ], - "versions": [] + ] }, { "format": "OpenXmlSpreadsheet", @@ -89,38 +95,17 @@ ], "contentTypes": [ "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet" - ], - "versions": [] - }, - { - "format": "OutlookMailMessage", - "fileExtensions": [ - ".msg" - ], - "contentTypes": [ - "application/vnd.ms-outlook" - ], - "versions": [] + ] }, { "format": "HtmlFile", "fileExtensions": [ - ".html" + ".html", + ".htm" ], "contentTypes": [ "text/html" - ], - "versions": [] - }, - { - "format": "OpenXmlWord", - "fileExtensions": [ - ".docx" - ], - "contentTypes": [ - "application/vnd.openxmlformats-officedocument.wordprocessingml.document" - ], - "versions": [] + ] } ] } diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index be97db209ed7..91a21eccc5c0 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -82,7 +82,7 @@ "inProgress": 0, "notYetStarted": 0, "cancelled": 0, - "totalCharacterCharged": 0 + "totalCharacterCharged": 1000 } } ] From 970fa2e2a65ff3007dc7054a1f06688160e8e0ac Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Wed, 24 Mar 2021 20:53:40 -0700 Subject: [PATCH 03/11] manually add ref --- .../preview/v1.0-preview.1/TranslatorBatch.json | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 3228140061c5..5a48ad205a3b 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -156,7 +156,8 @@ { "in": "query", "name": "status", - "description": "Status to use in filtering" + "description": "Status to use in filtering", + "$ref": "#/definitions/Status" }, { "in": "query", @@ -609,7 +610,8 @@ { "in": "query", "name": "status", - "description": "Status to use in filtering" + "description": "Status to use in filtering", + "$ref": "#/definitions/Status" }, { "in": "query", From 2da0d476ef0448cb099e1976ee460656065d0119 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Wed, 24 Mar 2021 21:20:48 -0700 Subject: [PATCH 04/11] try to fix swagger --- .../preview/v1.0-preview.1/TranslatorBatch.json | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 5a48ad205a3b..37d347df78d5 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -151,13 +151,16 @@ "items": { "format": "uuid", "type": "string" - } + }, + "collectionFormat": "csv" }, { "in": "query", "name": "status", "description": "Status to use in filtering", - "$ref": "#/definitions/Status" + "schema": { + "$ref": "#/definitions/Status" + } }, { "in": "query", @@ -605,13 +608,16 @@ "items": { "format": "uuid", "type": "string" - } + }, + "collectionFormat": "csv" }, { "in": "query", "name": "status", "description": "Status to use in filtering", - "$ref": "#/definitions/Status" + "schema": { + "$ref": "#/definitions/Status" + } }, { "in": "query", From 67741b98c161e9b3b2cdf35ef04c2c95b26149af Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 14:15:26 -0700 Subject: [PATCH 05/11] update swagger based on feedback --- .../v1.0-preview.1/TranslatorBatch.json | 24 +++++++++---------- .../v1.0-preview.1/examples/documents.json | 12 ++++++++-- .../v1.0-preview.1/examples/operations.json | 12 +++++++++- 3 files changed, 33 insertions(+), 15 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 37d347df78d5..a7583764b261 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -151,16 +151,13 @@ "items": { "format": "uuid", "type": "string" - }, - "collectionFormat": "csv" + } }, { "in": "query", "name": "status", "description": "Status to use in filtering", - "schema": { - "$ref": "#/definitions/Status" - } + "type": "string" }, { "in": "query", @@ -180,7 +177,10 @@ "in": "query", "name": "$orderBy", "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", - "type": "string" + "type": "array", + "items": { + "type": "string" + } } ], "responses": { @@ -608,16 +608,13 @@ "items": { "format": "uuid", "type": "string" - }, - "collectionFormat": "csv" + } }, { "in": "query", "name": "status", "description": "Status to use in filtering", - "schema": { - "$ref": "#/definitions/Status" - } + "type": "string" }, { "in": "query", @@ -637,7 +634,10 @@ "in": "query", "name": "$orderBy", "description": "the sorting query for the collection (ex: 'CreatedDateTimeUtc asc', 'CreatedDateTimeUtc desc')", - "type": "string" + "type": "array", + "items": { + "type": "string" + } } ], "responses": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index 8b9743d2f711..0caaee57dbc8 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -6,8 +6,16 @@ "endpoint": "{endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", "id": "727BF148-F327-47A0-9481-ABAE6362F11E", - "$top": 5, - "$skip": 10 + "$top": 20, + "$skip": 10, + "$maxpagesize": 10, + "$orderBy": "CreatedDateTime asc", + "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", + "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", + "Status": "Succeeded", + "ids": [ + "273622bd-835c-4946-9798-fd8f19f6bbf2" + ] }, "responses": { "401": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index 91a21eccc5c0..52e96c5d5ed3 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -4,7 +4,17 @@ "subscriptionId": "EA19050C-51FC-4B55-84E5-9EA7283601DA", "resourceGroupName": "TestResourceGroup", "endpoint": "{endpoint}", - "Ocp-Apim-Subscription-Key": "{API key}" + "Ocp-Apim-Subscription-Key": "{API key}", + "$top": 20, + "$skip": 10, + "$maxpagesize": 10, + "$orderBy": "CreatedDateTime asc", + "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", + "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", + "Status": "Succeeded", + "ids": [ + "273622bd-835c-4946-9798-fd8f19f6bbf2" + ] }, "responses": { "401": { From ca709ba3bc158cca28eed5c01f93a3f74e496a14 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 14:52:12 -0700 Subject: [PATCH 06/11] update swagger based on feedback. add retry-after --- .../v1.0-preview.1/TranslatorBatch.json | 34 ++++++++++++------- .../v1.0-preview.1/examples/documents.json | 4 ++- .../v1.0-preview.1/examples/format.json | 1 + .../v1.0-preview.1/examples/glossary.json | 1 + .../v1.0-preview.1/examples/operations.json | 4 ++- .../v1.0-preview.1/examples/storage.json | 1 + 6 files changed, 31 insertions(+), 14 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index a7583764b261..9746559f1a8c 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -136,7 +136,7 @@ { "in": "query", "name": "$maxpagesize", - "description": "$maxpagesize is the maximum items returned in the items in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "description": "$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", "type": "integer", "format": "int32", "default": 50, @@ -151,13 +151,17 @@ "items": { "format": "uuid", "type": "string" - } + }, + "maxLength": 25 }, { "in": "query", - "name": "status", - "description": "Status to use in filtering", - "type": "string" + "name": "statuses", + "description": "Statuses to use in filtering", + "type": "array", + "items": { + "$ref": "#/definitions/Status" + } }, { "in": "query", @@ -180,7 +184,8 @@ "type": "array", "items": { "type": "string" - } + }, + "maxLength": 1 } ], "responses": { @@ -593,7 +598,7 @@ { "in": "query", "name": "$maxpagesize", - "description": "$maxpagesize is the maximum items returned in the items in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", + "description": "$maxpagesize is the maximum items returned in a page. If more items are requested via $top (or $top is not specified and there are more items to be returned), @nextLink will contain the link to the next page.\r\n \r\nClients MAY request server-driven paging with a specific page size by specifying a $maxpagesize preference. The server SHOULD honor this preference if the specified page size is smaller than the server's default page size.", "type": "integer", "format": "int32", "default": 50, @@ -608,13 +613,17 @@ "items": { "format": "uuid", "type": "string" - } + }, + "maxLength": 25 }, { "in": "query", - "name": "status", - "description": "Status to use in filtering", - "type": "string" + "name": "statuses", + "description": "Statuses to use in filtering", + "type": "array", + "items": { + "$ref": "#/definitions/Status" + } }, { "in": "query", @@ -637,7 +646,8 @@ "type": "array", "items": { "type": "string" - } + }, + "maxLength": 1 } ], "responses": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index 0caaee57dbc8..156093bc15d4 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -12,7 +12,9 @@ "$orderBy": "CreatedDateTime asc", "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", - "Status": "Succeeded", + "statuses": [ + "Succeeded" + ], "ids": [ "273622bd-835c-4946-9798-fd8f19f6bbf2" ] diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json index 01233805287f..75b787a30523 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/format.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json index ec73e440dbb8..61347def0834 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index 52e96c5d5ed3..cc1fb9ebd946 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -11,7 +11,9 @@ "$orderBy": "CreatedDateTime asc", "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", - "Status": "Succeeded", + "statuses": [ + "Succeeded" + ], "ids": [ "273622bd-835c-4946-9798-fd8f19f6bbf2" ] diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json index 3a3064ae73c1..1180d718fd99 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/storage.json @@ -48,6 +48,7 @@ }, "200": { "headers": { + "retry-after": "30", "ETag": "686897696a7c876b7e" }, "body": { From b132e086ae8e50124d89b9d3a6a6b22cc92ee8cc Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 15:04:28 -0700 Subject: [PATCH 07/11] fix status type and datetime example --- .../v1.0-preview.1/TranslatorBatch.json | 57 ++++--------------- .../v1.0-preview.1/examples/documents.json | 4 +- .../v1.0-preview.1/examples/operations.json | 4 +- 3 files changed, 15 insertions(+), 50 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 9746559f1a8c..7e56f9a35344 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -160,8 +160,9 @@ "description": "Statuses to use in filtering", "type": "array", "items": { - "$ref": "#/definitions/Status" - } + "type": "string" + }, + "maxLength": 5 }, { "in": "query", @@ -622,8 +623,9 @@ "description": "Statuses to use in filtering", "type": "array", "items": { - "$ref": "#/definitions/Status" - } + "type": "string" + }, + "maxLength": 5 }, { "in": "query", @@ -1088,46 +1090,6 @@ } } }, - "Status": { - "description": "List of possible statuses for job or document", - "enum": [ - "NotStarted", - "Running", - "Succeeded", - "Failed", - "Cancelled", - "Cancelling", - "ValidationFailed" - ], - "type": "string", - "x-ms-enum": { - "name": "Status", - "modelAsString": true, - "values": [ - { - "value": "NotStarted" - }, - { - "value": "Running" - }, - { - "value": "Succeeded" - }, - { - "value": "Failed" - }, - { - "value": "Cancelled" - }, - { - "value": "Cancelling" - }, - { - "value": "ValidationFailed" - } - ] - } - }, "ErrorCodeV2": { "description": "Enums containing high level error codes.", "enum": [ @@ -1304,7 +1266,9 @@ "example": "2020-01-20T11:41:07.7010000-08:00" }, "status": { - "$ref": "#/definitions/Status" + "description": "Overall Operation status", + "type": "string", + "example": "Succeeded" }, "error": { "$ref": "#/definitions/ErrorV2" @@ -1370,7 +1334,8 @@ "example": "2020-01-20T11:41:07.7010000-08:00" }, "status": { - "$ref": "#/definitions/Status" + "description": "Status / progress of the translation of the Document.", + "type": "string" }, "to": { "description": "To language", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index 156093bc15d4..4560348c6333 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -10,8 +10,8 @@ "$skip": 10, "$maxpagesize": 10, "$orderBy": "CreatedDateTime asc", - "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", - "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", + "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", + "createdDateTimeUtcEnd": "2021-03-25T07:03:38.0136316Z", "statuses": [ "Succeeded" ], diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index cc1fb9ebd946..b741f7a4cbd6 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -9,8 +9,8 @@ "$skip": 10, "$maxpagesize": 10, "$orderBy": "CreatedDateTime asc", - "createdDateTimeUtcStart": "2021-03-23T00:03:38.0136316", - "createdDateTimeUtcEnd": "2021-03-25T00:03:38.0136316", + "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", + "createdDateTimeUtcEnd": "2021-03-25T07:03:38.0136316Z", "statuses": [ "Succeeded" ], From fd39065dbcf846bb4e6336620e0a789268418891 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 15:43:31 -0700 Subject: [PATCH 08/11] update examples, added required parameters --- .../preview/v1.0-preview.1/TranslatorBatch.json | 5 +++++ .../v1.0-preview.1/examples/documents.json | 17 +++++++++-------- .../v1.0-preview.1/examples/glossary.json | 1 + .../v1.0-preview.1/examples/operations.json | 10 +++++----- 4 files changed, 20 insertions(+), 13 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index 7e56f9a35344..ddcc9e25140f 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -1387,6 +1387,11 @@ } }, "FileFormat": { + "required": [ + "contentTypes", + "fileExtensions", + "format" + ], "type": "object", "properties": { "format": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index 4560348c6333..a78c2a36b98e 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -6,17 +6,18 @@ "endpoint": "{endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", "id": "727BF148-F327-47A0-9481-ABAE6362F11E", - "$top": 20, - "$skip": 10, - "$maxpagesize": 10, - "$orderBy": "CreatedDateTime asc", + "$top": 2, + "$skip": 0, + "$maxpagesize": 1, + "$orderBy": "CreatedDateTimeUtc asc", "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", "createdDateTimeUtcEnd": "2021-03-25T07:03:38.0136316Z", "statuses": [ "Succeeded" ], "ids": [ - "273622bd-835c-4946-9798-fd8f19f6bbf2" + "273622bd-835c-4946-9798-fd8f19f6bbf2", + "511b6a66-a6f8-4640-83e1-48c325e9fa29" ] }, "responses": { @@ -100,8 +101,8 @@ { "path": "https://myblob.blob.core.windows.net/destinationContainer/fr/mydoc.txt", "sourcePath": "https://myblob.blob.core.windows.net/sourceContainer/fr/mydoc.txt", - "createdDateTimeUtc": "2020-03-26T00:00:00Z", - "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", + "createdDateTimeUtc": "2021-03-23T07:03:39.013631Z", + "lastActionDateTimeUtc": "2021-03-23T07:03:41.012452Z", "status": "Running", "to": "fr", "progress": 0.1, @@ -109,7 +110,7 @@ "characterCharged": 0 } ], - "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=5&$skip=15" + "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=1&$skip=1&$maxpagesize=1&$orderBy=CreatedDateTimeUtc asc&createdDateTimeUtcStart=2021-03-23T00:03:38.0136316Z&createdDateTimeUtcEnd=2021-03-25T00:03:38.0136316&statuses=Succeeded&ids=273622BD-835C-4946-9798-FD8F19F6BBF2,511B6A66-A6F8-4640-83E1-48C325E9FA29" } }, "400": { diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json index 61347def0834..0b638db5c8ac 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/glossary.json @@ -61,6 +61,7 @@ "contentTypes": [ "application/xliff+xml" ], + "defaultVersion": "1.2", "versions": [ "1.0", "1.1", diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json index b741f7a4cbd6..0a03ff0e78f4 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/operations.json @@ -5,8 +5,8 @@ "resourceGroupName": "TestResourceGroup", "endpoint": "{endpoint}", "Ocp-Apim-Subscription-Key": "{API key}", - "$top": 20, - "$skip": 10, + "$top": 1, + "$skip": 0, "$maxpagesize": 10, "$orderBy": "CreatedDateTime asc", "createdDateTimeUtcStart": "2021-03-23T07:03:38.0136316Z", @@ -83,9 +83,9 @@ "body": { "value": [ { - "id": "727bf148-f327-47a0-9481-abae6362f11e", - "createdDateTimeUtc": "2020-03-26T00:00:00Z", - "lastActionDateTimeUtc": "2020-03-26T01:00:00Z", + "id": "273622bd-835c-4946-9798-fd8f19f6bbf2", + "createdDateTimeUtc": "2021-03-23T07:03:30.013631Z", + "lastActionDateTimeUtc": "2021-03-26T01:00:00Z", "status": "Succeeded", "summary": { "total": 10, From 000d716149bfeef076e0aa968abe33d9156795e6 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 16:53:29 -0700 Subject: [PATCH 09/11] make nextlink an urlencoded string --- .../preview/v1.0-preview.1/examples/documents.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json index a78c2a36b98e..c46aac3ed75a 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/examples/documents.json @@ -110,7 +110,7 @@ "characterCharged": 0 } ], - "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=1&$skip=1&$maxpagesize=1&$orderBy=CreatedDateTimeUtc asc&createdDateTimeUtcStart=2021-03-23T00:03:38.0136316Z&createdDateTimeUtcEnd=2021-03-25T00:03:38.0136316&statuses=Succeeded&ids=273622BD-835C-4946-9798-FD8F19F6BBF2,511B6A66-A6F8-4640-83E1-48C325E9FA29" + "@nextLink": "https://westus.cognitiveservices.azure.com/translator/text/batch/v1.0.preview.1/operation/0FA2822F-4C2A-4317-9C20-658C801E0E55/documents?$top=1&$skip=1&$maxpagesize=1&$orderBy=CreatedDateTimeUtc%20asc&createdDateTimeUtcStart=2021-03-23T00:03:38.0136316Z&createdDateTimeUtcEnd=2021-03-25T00:03:38.0136316&statuses=Succeeded&ids=273622BD-835C-4946-9798-FD8F19F6BBF2,511B6A66-A6F8-4640-83E1-48C325E9FA29" } }, "400": { From c1d2b21b1f6c0a9861b2dfd95d0d5661efdc8216 Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 17:44:30 -0700 Subject: [PATCH 10/11] add etag in swagger for these responses --- .../v1.0-preview.1/TranslatorBatch.json | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index ddcc9e25140f..d11bccb65668 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -758,6 +758,13 @@ "description": "Returns the list of supported document file formats", "schema": { "$ref": "#/definitions/FileFormatListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { @@ -814,6 +821,13 @@ "description": "Returns the list of supported glossary file formats", "schema": { "$ref": "#/definitions/FileFormatListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { @@ -870,6 +884,13 @@ "description": "Successful request and returns the list of storage sources", "schema": { "$ref": "#/definitions/StorageSourceListResult" + }, + "headers": { + "Retry-After": { + "description": "Indicates how long to wait before making a new request.", + "type": "integer", + "format": "int32" + } } }, "429": { From 9f593b82ea5140acf7927242604ba8cea0f0f6fb Mon Sep 17 00:00:00 2001 From: Alex Cheng Date: Thu, 25 Mar 2021 19:02:54 -0700 Subject: [PATCH 11/11] re-add x-ms-enums and schema for status --- .../v1.0-preview.1/TranslatorBatch.json | 47 +++++++++++++++++-- 1 file changed, 42 insertions(+), 5 deletions(-) diff --git a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json index d11bccb65668..2f49d9301271 100644 --- a/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json +++ b/specification/cognitiveservices/data-plane/TranslatorText/preview/v1.0-preview.1/TranslatorBatch.json @@ -1111,6 +1111,46 @@ } } }, + "Status": { + "description": "List of possible statuses for job or document", + "enum": [ + "NotStarted", + "Running", + "Succeeded", + "Failed", + "Cancelled", + "Cancelling", + "ValidationFailed" + ], + "type": "string", + "x-ms-enum": { + "name": "Status", + "modelAsString": true, + "values": [ + { + "value": "NotStarted" + }, + { + "value": "Running" + }, + { + "value": "Succeeded" + }, + { + "value": "Failed" + }, + { + "value": "Cancelled" + }, + { + "value": "Cancelling" + }, + { + "value": "ValidationFailed" + } + ] + } + }, "ErrorCodeV2": { "description": "Enums containing high level error codes.", "enum": [ @@ -1287,9 +1327,7 @@ "example": "2020-01-20T11:41:07.7010000-08:00" }, "status": { - "description": "Overall Operation status", - "type": "string", - "example": "Succeeded" + "$ref": "#/definitions/Status" }, "error": { "$ref": "#/definitions/ErrorV2" @@ -1355,8 +1393,7 @@ "example": "2020-01-20T11:41:07.7010000-08:00" }, "status": { - "description": "Status / progress of the translation of the Document.", - "type": "string" + "$ref": "#/definitions/Status" }, "to": { "description": "To language",