Skip to content

Commit

Permalink
FRv2.1-preview.2 update (#10805)
Browse files Browse the repository at this point in the history
* Initial update for .preview.2 release.

* Standardized Errors, sample list.

* removing from master from now as this is just a proposal

* Add support for preview.3

* Adding appearance property to ReadResult.

* Incorporate review feedback.

* Update swagger

* Updating page range parameter for layout API.

* Adding .bmp, language support, table bounding box.

* Refactoring Locale parameter.

* Refactor language parameter.

* Ran prettier.

* Spell check fix.

* Update to add preview.2 swagger.

* Update specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.1-preview.2/FormRecognizer.json

Co-authored-by: Krista Pratico <krpratic@microsoft.com>

* Update specification/cognitiveservices/data-plane/FormRecognizer/preview/v2.1-preview.2/FormRecognizer.json

Co-authored-by: Krista Pratico <krpratic@microsoft.com>

* Incorporate review feedback.

* Incorporating review feedback.

* Adding language to ReadResult - Japan

Co-authored-by: Sandeep Parab <rparab@ntdev.microsoft.com>
Co-authored-by: Krista Pratico <krpratic@microsoft.com>
  • Loading branch information
3 people authored Jan 12, 2021
1 parent 731b282 commit 788507c
Show file tree
Hide file tree
Showing 23 changed files with 2,675 additions and 3 deletions.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"body": {}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{endpoint}/formrecognizer/v2.1-preview.2/custom/models/{modelId}/analyzeResults/{resultId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"resultId": "{result Id}",
"body": {}
},
"responses": {
"200": {
"body": {
"status": "running",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"analyzeResult": {
"version": "v2.1",
"readResults": [],
"pageResults": [],
"documentResults": [],
"errors": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
"source": "http://www.example.com/image.jpg"
}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{endpoint}/formrecognizer/v2.1-preview.2/prebuilt/businessCard/analyzeResults/{resultId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"resultId": "{result Id}",
"body": {}
},
"responses": {
"200": {
"body": {
"status": "running",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"analyzeResult": {
"version": "v2.1",
"readResults": [],
"pageResults": [],
"documentResults": [],
"errors": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {},
"composeRequest": {
"modelIds": [
"4afb20d6-3ed0-4cde-ba40-dbd6207268dd",
"6f841356-aa32-42c9-a739-2182c47b79c9"
]
}
},
"responses": {
"201": {
"headers": {
"Location": "{endpoint}/formrecognizer/v2.1-preview.2/custom/models/{modelId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"body": {},
"copyRequest": {
"targetResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{resourceName}",
"targetResourceRegion": "westus2",
"copyAuthorization": {
"modelId": "{modelId}",
"accessToken": "{accessToken}",
"expirationDateTimeTicks": 637190189980000000
}
}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{endpoint}/formrecognizer/v2.1-preview.2/custom/models/{modelId}/copyResults/{resultId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {}
},
"responses": {
"201": {
"headers": {
"Location": "{endpoint}/formrecognizer/v2.1-preview.2/custom/models/{modelId}"
},
"body": {
"modelId": "{modelId}",
"accessToken": "{accessToken}",
"expirationDateTimeTicks": 637190189980000000
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"resultId": "{resultId}",
"body": {}
},
"responses": {
"200": {
"body": {
"status": "succeeded",
"createdDateTime": "2020-01-01T00:00:00Z",
"lastUpdatedDateTime": "2020-01-01T00:01:00Z",
"copyResult": {
"modelId": "{modelId}",
"errors": []
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"resultId": "{resultId}",
"body": {}
},
"responses": {
"200": {
"body": {
"status": "failed",
"createdDateTime": "2020-01-01T00:00:00Z",
"lastUpdatedDateTime": "2020-01-01T00:01:00Z",
"copyResult": {
"modelId": "{modelId}",
"errors": [
{
"code": "ResourceResolverError",
"message": "{ErrorMessage}"
}
]
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"body": {}
},
"responses": {
"204": {}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"modelId": "{modelId}",
"body": {}
},
"responses": {
"200": {
"body": {
"modelInfo": {
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
"modelName": "my composed model",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"attributes": {
"isComposed": true
}
},
"keys": {
"clusters": {
"0": [
"Invoice",
"123112313"
],
"1": [
"Please remit payment to:",
"Microsoft"
]
}
},
"trainResult": {
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
},
"composedTrainResults": [
{
"modelId": "4afb20d6-3ed0-4cde-ba40-dbd6207268dd",
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
},
{
"modelId": "6f841356-aa32-42c9-a739-2182c47b79c9",
"trainingDocuments": [],
"fields": [],
"averageModelAccuracy": 0,
"errors": []
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"op": "full",
"body": {}
},
"responses": {
"200": {
"body": {
"summary": {
"count": 2,
"limit": 5000,
"lastUpdatedDateTime": "2019-05-01T10:53:21Z"
},
"modelList": [
{
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
"modelName": "test model 1",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"attributes": {
"isComposed": false
}
},
{
"modelId": "f973e3c1-0001-43bb-bea8-49d0603ab3a8",
"modelName": "test model 2",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"attributes": {
"isComposed": true
}
}
],
"nextLink": ""
}
}
}
}
Original file line number Diff line number Diff line change
@@ -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"
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {}
},
"responses": {
"202": {
"headers": {
"Operation-Location": "{endpoint}/formrecognizer/v2.1-preview.2/prebuilt/invoice/analyzeResults/{resultId}"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
{
"parameters": {
"endpoint": "{endpoint}",
"Ocp-Apim-Subscription-Key": "{API key}",
"resultId": "{result Id}",
"body": {}
},
"responses": {
"200": {
"body": {
"status": "running",
"createdDateTime": "2019-05-01T10:53:21Z",
"lastUpdatedDateTime": "2019-05-01T10:53:23Z",
"analyzeResult": {
"version": "v2.1",
"readResults": [],
"pageResults": [],
"documentResults": [],
"errors": []
}
}
}
}
}
Loading

0 comments on commit 788507c

Please sign in to comment.