diff --git a/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/FormRecognizer.json b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/FormRecognizer.json index 2db307f4d4b9..7f648e7d2150 100644 --- a/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/FormRecognizer.json +++ b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/FormRecognizer.json @@ -38,6 +38,9 @@ "consumes": [ "application/json" ], + "produces": [ + "application/json" + ], "parameters": [ { "name": "trainRequest", @@ -74,52 +77,6 @@ "$ref": "./examples/TrainBatchWithSubFolders.json" } } - }, - "get": { - "summary": "List Custom Models", - "description": "Get information about all custom models", - "operationId": "GetCustomModels", - "consumes": [], - "produces": [ - "application/json" - ], - "parameters": [ - { - "name": "op", - "in": "query", - "description": "Specify whether to return summary or full list of models.", - "required": false, - "default": "full", - "type": "string", - "enum": [ - "full", - "summary" - ] - } - ], - "responses": { - "200": { - "description": "Success", - "schema": { - "$ref": "#/definitions/Models" - } - }, - "default": { - "description": "Response entity accompanying non-successful responses containing additional details about the error.", - "schema": { - "$ref": "#/definitions/ErrorResponse" - } - } - }, - "x-ms-pageable": { - "nextLinkName": "nextLink", - "itemName": "modelList" - }, - "x-ms-examples": { - "List custom models": { - "$ref": "./examples/GetModels.json" - } - } } }, "/custom/models/{modelId}": { @@ -218,6 +175,9 @@ "image/png", "image/tiff" ], + "produces": [ + "application/json" + ], "parameters": [ { "name": "modelId", @@ -493,6 +453,96 @@ } } }, + "x-ms-paths": { + "/custom/models?op=full": { + "get": { + "summary": "List Custom Models", + "description": "Get information about all custom models", + "operationId": "ListCustomModels", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "op", + "in": "query", + "description": "Specify whether to return summary or full list of models.", + "required": true, + "type": "string", + "enum": [ + "full" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Models" + } + }, + "default": { + "description": "Response entity accompanying non-successful responses containing additional details about the error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-pageable": { + "nextLinkName": "nextLink", + "itemName": "modelList" + }, + "x-ms-examples": { + "List custom models": { + "$ref": "./examples/GetModels.json" + } + } + } + }, + "/custom/models?op=summary": { + "get": { + "summary": "Get Custom Models", + "description": "Get information about all custom models", + "operationId": "GetCustomModels", + "consumes": [], + "produces": [ + "application/json" + ], + "parameters": [ + { + "name": "op", + "in": "query", + "description": "Specify whether to return summary or full list of models.", + "required": true, + "type": "string", + "enum": [ + "summary" + ] + } + ], + "responses": { + "200": { + "description": "Success", + "schema": { + "$ref": "#/definitions/Models" + } + }, + "default": { + "description": "Response entity accompanying non-successful responses containing additional details about the error.", + "schema": { + "$ref": "#/definitions/ErrorResponse" + } + } + }, + "x-ms-examples": { + "Get models summary": { + "$ref": "./examples/GetModelsSummary.json" + } + } + } + } + }, "definitions": { "OperationStatus": { "type": "string", @@ -629,10 +679,6 @@ } } }, - "SourceDataStream": { - "description": "A PDF document, image (jpg/png/tiff), or JSON file to analyze.", - "type": "object" - }, "ModelInfo": { "description": "Basic custom model information.", "type": "object", @@ -696,7 +742,7 @@ "x-nullable": false }, "limit": { - "description": "Max number of models that can be trained for this subscription.", + "description": "Max number of models that can be trained for this account.", "type": "integer", "x-nullable": false }, @@ -1221,6 +1267,7 @@ }, "DocumentResult": { "description": "A set of extracted fields corresponding to the input document.", + "type": "object", "required": [ "docType", "pageRange", @@ -1268,14 +1315,13 @@ }, "valueDate": { "description": "Date value.", + "format": "date", "type": "string", - "format": "date-time", "x-nullable": false }, "valueTime": { "description": "Time value.", "type": "string", - "format": "date-time", "x-nullable": false }, "valuePhoneNumber": { @@ -1376,7 +1422,7 @@ "x-ms-parameter-location": "method", "in": "body", "schema": { - "$ref": "#/definitions/SourceDataStream" + "$ref": "#/definitions/SourcePath" } } } diff --git a/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModels.json b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModels.json index 1ebb45e86268..9df92cccfdc4 100644 --- a/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModels.json +++ b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModels.json @@ -9,11 +9,6 @@ "responses": { "200": { "body": { - "summary": { - "count": 5, - "limit": 5000, - "lastUpdatedDateTime": "2019-05-01T10:53:21Z" - }, "modelList": [ { "modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8", diff --git a/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModelsSummary.json b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModelsSummary.json new file mode 100644 index 000000000000..507495b78206 --- /dev/null +++ b/specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.0/examples/GetModelsSummary.json @@ -0,0 +1,20 @@ +{ + "parameters": { + "endpoint": "{endpoint}", + "Content-Type": "application/json", + "Ocp-Apim-Subscription-Key": "{API key}", + "op": "summary", + "body": {} + }, + "responses": { + "200": { + "body": { + "summary": { + "count": 5, + "limit": 5000, + "lastUpdatedDateTime": "2019-05-01T10:53:21Z" + } + } + } + } +}