Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
c30a385
Initial commit.
Apr 17, 2019
00e4cf3
Incorporating PR feedback
Apr 18, 2019
8dbcee7
Adding examples, cleanup.
Apr 18, 2019
90946c6
Fixing json syntax errors.
Apr 18, 2019
5812674
Incorporating feedback.
Apr 18, 2019
843f2f7
Refactor swagger to common type.
Apr 18, 2019
2c78f40
Incorporating feedback.
Apr 19, 2019
3840cae
Moved to preview, refactor, fixes.
Apr 19, 2019
29ea35b
Updated text.
Apr 19, 2019
6efacb5
Minor text change.
Apr 19, 2019
292f8ba
More minor text updates.
Apr 19, 2019
781f7db
Reverting accidental change
Apr 21, 2019
10c7f52
Refactor
Apr 21, 2019
e137884
Refactor, Adding GetModels REST API placeholder
Apr 22, 2019
3753fc5
Refactor, fixes
Apr 25, 2019
5ed88d4
Refactor, Updated definitions.
Apr 25, 2019
9864cca
Fix type definition
Apr 25, 2019
da9d7d3
model* API endpoint updated
Apr 26, 2019
81b6743
Fix build issue, Reverting change to face swagger
Apr 26, 2019
4d75131
updated namespace
Apr 26, 2019
29e2bc7
Updated return type for /models api
Apr 27, 2019
4e65e77
Update FormRecognizer.json
Bastortz2 Apr 27, 2019
3ae0d35
Merge pull request #1 from Bastortz2/patch-2
ramparab Apr 27, 2019
4c99141
Refactor, opid changes.
Apr 30, 2019
8385975
removing multi as it causing autorest codegen issues with langs like …
Apr 30, 2019
9b1f37a
reverting face.json changes.
Apr 30, 2019
355ce60
renamed example, fixed typo in example to make it valid json
Apr 30, 2019
afc041b
API review feedback, Reverting OpIds
Apr 30, 2019
c5ddd4b
API review feedback, fixing examples for model verification
May 1, 2019
0f9441c
Fixing examples for model validation
May 1, 2019
6b2d1b2
Capturing feedback from API Review
May 1, 2019
0c0e7b2
Capturing feedback from API review
May 1, 2019
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"id": "{Model Id}",
"body": {
"formData": {
}
},
"form_stream": "{Image or Pdf file stream}"
},
"responses": {
"200": {
"body":{
"status": "success",
"pages": [
{
"number": 1,
"height": 800,
"width": 600,
"clusterId": 0,
"keyValuePairs": [
{
"key": [
{
"text": "Address:",
"boundingBox": [
57.4,
683.1,
100.5,
683.1,
100.5,
673.7,
57.4,
673.7
]
}
],
"value": [
{
"text": "1 Microsoft Way",
"boundingBox": [
57.4,
672.2,
126.6,
672.2,
126.6,
658.9,
57.4,
658.9
],
"confidence": 0.9
}
]
}
],
"tables": [
{
"id": "table_0",
"columns": [
{
"header": [
{
"text": "InvoiceNumber",
"boundingBox": [
38.5,
585.2,
113.4,
585.2,
113.4,
575.8,
38.5,
575.8
]
}
],
"entries": [
[
{
"text": "38772349",
"boundingBox": [
305.6,
692.1,
403.5,
692.1,
403.5,
684.2,
305.6,
684.2
],
"confidence": 0.9
}
]
]
}
]
}
]
}
],
"errors": [
{
"errorMessage": "Page1: Field not extracted"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"id": "{Model Id}",
"body": {
}
},
"responses": {
"204": {
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"id": "{Model Id}",
"body": {
}
},
"responses": {
"200": {
"body": {
"clusters": {
"0": [
"Invoice",
"123112313"
],
"1": [
"Please remit payment to:",
"Microsoft"
]
}
}
}
}
}
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}",
"id": "{Model Id}",
"body": {
}
},
"responses": {
"200": {
"body": {
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21+00:00",
"lastUpdatedDateTime": "2019-05-01T10:53:23+00:00"
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"id": "{Model Id}",
"body": {
}
},
"responses": {
"200": {
"body": {
"models": [
{
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
"status": "ready",
"createdDateTime": "2019-05-01T10:53:21+00:00",
"lastUpdatedDateTime": "2019-05-01T10:53:23+00:00"
},
{
"modelId": "8dd53a98-bc73-43da-8533-60183824eb8e",
"status": "ready",
"createdDateTime": "2019-04-30T21:39:41+00:00",
"lastUpdatedDateTime": "2019-04-30T21:39:44+00:00"
}
]
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {
},
"trainRequest" : {
"source": "/input/data"
}
},
"responses": {
"200": {
"body":{
"modelId": "ad1901b6-ddaa-4249-8938-3f03f65cc893",
"trainingDocuments": [
{
"documentName": "0.pdf",
"pages": 1,
"errors": [],
"status": "success"
},
{
"documentName": "1.pdf",
"pages": 1,
"errors": [],
"status": "success"
},
{
"documentName": "2.pdf",
"pages": 1,
"errors": [],
"status": "success"
},
{
"documentName": "3.pdf",
"pages": 1,
"errors": [],
"status": "success"
},
{
"documentName": "4.pdf",
"pages": 1,
"errors": [],
"status": "success"
}
],
"errors": []
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
Form Recognizer: API Review Feedback

PR Link: https://github.com/Azure/azure-rest-api-specs/pull/5684

Feedback:
---------
1. [shahabhijeet] Don't specify x-nullable: false.
2. [shahabhijeet] Use x-ms-enum for Status field (or other enums)
3. [shahabhijeet] Consider modeling error responses to something like:
{
"error": {
"code": "",
"message": "",
"target": "",
"additionalInfo": [],
"details": [
{
"code": "",
"target": "",
"message": "",
"additionalInfo": [
{
"type": "PolicyViolation",
"info": {
"policySetDefinitionDisplayName": "Secure the environment",
"policySetDefinitionId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policySetDefinitions/TestPolicySet",
"policyDefinitionDisplayName": "Allowed locations",
"policyDefinitionId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policyDefinitions/TestPolicy1",
"policyAssignmentDisplayName": "Allow Central US and WEU only",
"policyAsssignmentId":"/subscriptions/00000-00000-0000-000/providers/Microsoft.Authorization/policyAssignments/TestAssignment1",
...
...
...
}
}
]
}
]
}
}
Also: https://github.com/Azure/azure-resource-manager-rpc/blob/master/v1.0/common-api-details.md#error-response-content
(this is not the updated link, as I am trying to find the updated model, will post as soon as I find it, hence provided an actual example.
The format I am recommending allows you to have multiple error information objects as an array and "info" object is nothing but a generic JObject for dumping information like innerException.

4. [johanste] /TrainCustomModel operation creates an addressable resource (keyed by the modelId in the response)
This should probably return a 201 with a Location header pointing to the result.

Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
## Go

These settings apply only when `--go` is specified on the command line.

``` yaml $(go)
go:
license-header: MICROSOFT_APACHE_NO_VERSION
namespace: formrecognizer
clear-output-folder: true
```

### Go multi-api

``` yaml $(go) && $(multiapi)
batch:
- tag: release_1_0
```

### Tag: release_1_0 and go

These settings apply only when `--tag=release_1_0 --go` is specified on the command line.
Please also specify `--go-sdk-folder=<path to the root directory of your azure-sdk-for-go clone>`.

``` yaml $(tag) == 'release_1_0' && $(go)
output-folder: $(go-sdk-folder)/services/cognitiveservices/v1.0/$(namespace)
```
Loading