Skip to content

Commit 2dc0129

Browse files
authored
Update documentation for FormRecognizer v2.1 (#28823)
* Update documentation for FormRecognizer v2.1 * update modelid and resultid in examples to be uuid
1 parent 034d7ca commit 2dc0129

22 files changed

+51
-75
lines changed

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/FormRecognizer.json

Lines changed: 21 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@
3232
"paths": {
3333
"/custom/models": {
3434
"post": {
35-
"summary": "Train Custom Model",
3635
"description": "Create and train a custom model. The request must include a source parameter that is either an externally accessible Azure storage blob container Uri (preferably a Shared Access Signature Uri) or valid path to a data folder in a locally mounted drive. When local paths are specified, they must follow the Linux/Unix path format and be an absolute path rooted to the input mount configuration setting value e.g., if '{Mounts:Input}' configuration setting value is '/input' then a valid source path would be '/input/contosodataset'. All data to be trained is expected to be under the source folder or sub folders under it. Models are trained using documents that are of the following content type - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Other type of content is ignored.",
37-
"operationId": "TrainCustomModelAsync",
36+
"operationId": "CustomModels_Train",
3837
"consumes": [
3938
"application/json"
4039
],
@@ -82,9 +81,8 @@
8281
},
8382
"/custom/models/{modelId}": {
8483
"get": {
85-
"summary": "Get Custom Model",
8684
"description": "Get detailed information about a custom model.",
87-
"operationId": "GetCustomModel",
85+
"operationId": "CustomModels_Get",
8886
"consumes": [],
8987
"produces": [
9088
"application/json"
@@ -129,9 +127,8 @@
129127
}
130128
},
131129
"delete": {
132-
"summary": "Delete Custom Model",
133130
"description": "Mark model for deletion. Model artifacts will be permanently removed within a predetermined period.",
134-
"operationId": "DeleteCustomModel",
131+
"operationId": "CustomModels_Delete",
135132
"consumes": [],
136133
"produces": [
137134
"application/json"
@@ -166,9 +163,8 @@
166163
},
167164
"/custom/models/{modelId}/analyze": {
168165
"post": {
169-
"summary": "Analyze Form",
170166
"description": "Extract key-value pairs, tables, and semantic values from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed.",
171-
"operationId": "AnalyzeWithCustomModel",
167+
"operationId": "CustomModels_AnalyzeDocument",
172168
"consumes": [
173169
"application/pdf",
174170
"application/json",
@@ -232,9 +228,8 @@
232228
},
233229
"/custom/models/{modelId}/analyzeResults/{resultId}": {
234230
"get": {
235-
"summary": "Get Analyze Form Result",
236231
"description": "Obtain current status and the result of the analyze form operation.",
237-
"operationId": "GetAnalyzeFormResult",
232+
"operationId": "CustomModels_GetAnalyzeResult",
238233
"consumes": [],
239234
"produces": [
240235
"application/json"
@@ -280,9 +275,8 @@
280275
},
281276
"/custom/models/{modelId}/copy": {
282277
"post": {
283-
"summary": "Copy Custom Model",
284278
"description": "Copy custom model stored in this resource (the source) to user specified target Form Recognizer resource.",
285-
"operationId": "CopyCustomModel",
279+
"operationId": "CustomModels_Copy",
286280
"consumes": [
287281
"application/json"
288282
],
@@ -335,9 +329,8 @@
335329
},
336330
"/custom/models/{modelId}/copyResults/{resultId}": {
337331
"get": {
338-
"summary": "Get Custom Model Copy Result",
339332
"description": "Obtain current status and the result of a custom model copy operation.",
340-
"operationId": "GetCustomModelCopyResult",
333+
"operationId": "CustomModels_GetCopyResult",
341334
"consumes": [],
342335
"produces": [
343336
"application/json"
@@ -386,9 +379,8 @@
386379
},
387380
"/custom/models/copyAuthorization": {
388381
"post": {
389-
"summary": "Generate Copy Authorization",
390382
"description": "Generate authorization to copy a model into the target Form Recognizer resource.",
391-
"operationId": "GenerateModelCopyAuthorization",
383+
"operationId": "CustomModels_AuthorizeModelCopy",
392384
"consumes": [],
393385
"produces": [
394386
"application/json"
@@ -423,12 +415,8 @@
423415
},
424416
"/custom/models/compose": {
425417
"post": {
426-
"tags": [
427-
"Form"
428-
],
429-
"summary": "Compose trained with labels models into one composed model.",
430418
"description": "Compose request would include list of models ids.\r\nIt would validate what all models either trained with labels model or composed model.\r\nIt would validate limit of models put together.",
431-
"operationId": "ComposeCustomModelsAsync",
419+
"operationId": "CustomModels_Compose",
432420
"consumes": [],
433421
"produces": [
434422
"application/json",
@@ -472,9 +460,8 @@
472460
},
473461
"/prebuilt/businessCard/analyze": {
474462
"post": {
475-
"summary": "Analyze Business Card",
476463
"description": "Extract field text and semantic values from a given business card document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri) of the document to be analyzed.",
477-
"operationId": "AnalyzeBusinessCardAsync",
464+
"operationId": "Analyzer_AnalyzeBusinessCard",
478465
"consumes": [
479466
"application/pdf",
480467
"application/json",
@@ -533,9 +520,8 @@
533520
},
534521
"/prebuilt/businessCard/analyzeResults/{resultId}": {
535522
"get": {
536-
"summary": "Get Analyze Business Card Result",
537523
"description": "Track the progress and obtain the result of the analyze business card operation.",
538-
"operationId": "GetAnalyzeBusinessCardResult",
524+
"operationId": "Analyzer_GetAnalyzeBusinessCardResult",
539525
"consumes": [],
540526
"produces": [
541527
"application/json"
@@ -573,9 +559,8 @@
573559
},
574560
"/prebuilt/invoice/analyze": {
575561
"post": {
576-
"summary": "Analyze Invoice Document",
577562
"description": "Extract field text and semantic values from a given invoice document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri) of the document to be analyzed.",
578-
"operationId": "AnalyzeInvoiceAsync",
563+
"operationId": "Analyzer_AnalyzeInvoice",
579564
"consumes": [
580565
"application/pdf",
581566
"application/json",
@@ -634,9 +619,8 @@
634619
},
635620
"/prebuilt/invoice/analyzeResults/{resultId}": {
636621
"get": {
637-
"summary": "Get Analyze Invoice Result",
638622
"description": "Track the progress and obtain the result of the analyze invoice operation.",
639-
"operationId": "GetAnalyzeInvoiceResult",
623+
"operationId": "Analyzer_GetAnalyzeInvoiceResult",
640624
"consumes": [],
641625
"produces": [
642626
"application/json"
@@ -674,9 +658,8 @@
674658
},
675659
"/prebuilt/idDocument/analyze": {
676660
"post": {
677-
"summary": "Analyze ID Document",
678661
"description": "Extract field text and semantic values from a given ID document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri) of the document to be analyzed.",
679-
"operationId": "AnalyzeIdDocumentAsync",
662+
"operationId": "Analyzer_AnalyzeIdDocument",
680663
"consumes": [
681664
"application/pdf",
682665
"application/json",
@@ -732,9 +715,8 @@
732715
},
733716
"/prebuilt/idDocument/analyzeResults/{resultId}": {
734717
"get": {
735-
"summary": "Get Analyze ID Document Result",
736718
"description": "Track the progress and obtain the result of the analyze ID operation.",
737-
"operationId": "GetAnalyzeIdDocumentResult",
719+
"operationId": "Analyzer_GetAnalyzeIdDocumentResult",
738720
"consumes": [],
739721
"produces": [
740722
"application/json"
@@ -772,9 +754,8 @@
772754
},
773755
"/prebuilt/receipt/analyze": {
774756
"post": {
775-
"summary": "Analyze Receipt",
776757
"description": "Extract field text and semantic values from a given receipt document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri) of the document to be analyzed.",
777-
"operationId": "AnalyzeReceiptAsync",
758+
"operationId": "Analyzer_AnalyzeReceipt",
778759
"consumes": [
779760
"application/pdf",
780761
"application/json",
@@ -833,9 +814,8 @@
833814
},
834815
"/prebuilt/receipt/analyzeResults/{resultId}": {
835816
"get": {
836-
"summary": "Get Analyze Receipt Result",
837817
"description": "Track the progress and obtain the result of the analyze receipt operation.",
838-
"operationId": "GetAnalyzeReceiptResult",
818+
"operationId": "Analyzer_GetAnalyzeReceiptResult",
839819
"consumes": [],
840820
"produces": [
841821
"application/json"
@@ -873,9 +853,8 @@
873853
},
874854
"/layout/analyze": {
875855
"post": {
876-
"summary": "Analyze Layout",
877856
"description": "Extract text and layout information from a given document. The input document must be of one of the supported content types - 'application/pdf', 'image/jpeg', 'image/png', 'image/tiff' or 'image/bmp'. Alternatively, use 'application/json' type to specify the location (Uri or local path) of the document to be analyzed.",
878-
"operationId": "AnalyzeLayoutAsync",
857+
"operationId": "Analyzer_AnalyzeLayout",
879858
"consumes": [
880859
"application/pdf",
881860
"application/json",
@@ -928,9 +907,8 @@
928907
},
929908
"/layout/analyzeResults/{resultId}": {
930909
"get": {
931-
"summary": "Get Analyze Layout Result",
932910
"description": "Track the progress and obtain the result of the analyze layout operation",
933-
"operationId": "GetAnalyzeLayoutResult",
911+
"operationId": "Analyzer_GetAnalyzeLayoutResult",
934912
"consumes": [],
935913
"produces": [
936914
"application/json"
@@ -970,9 +948,8 @@
970948
"x-ms-paths": {
971949
"/custom/models?op=full": {
972950
"get": {
973-
"summary": "List Custom Models",
974951
"description": "Get information about all custom models",
975-
"operationId": "ListCustomModels",
952+
"operationId": "CustomModels_List",
976953
"consumes": [],
977954
"produces": [
978955
"application/json"
@@ -1016,9 +993,8 @@
1016993
},
1017994
"/custom/models?op=summary": {
1018995
"get": {
1019-
"summary": "Get Custom Models",
1020996
"description": "Get information about all custom models",
1021-
"operationId": "GetCustomModels",
997+
"operationId": "CustomModels_GetSummary",
1022998
"consumes": [],
1023999
"produces": [
10241000
"application/json"

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/AnalyzeBatch.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"endpoint": "{endpoint}",
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
6-
"modelId": "{modelId}",
6+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
77
"body": {}
88
},
99
"responses": {
1010
"202": {
1111
"headers": {
12-
"Operation-Location": "{endpoint}/formrecognizer/v2.1/custom/models/{modelId}/analyzeResults/{resultId}"
12+
"Operation-Location": "{endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8/analyzeResults/3b1e6c5b-e113-4114-ab6b-ce65dfe8050f"
1313
}
1414
}
1515
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/AnalyzeOperationResult.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
"parameters": {
33
"endpoint": "{endpoint}",
44
"Ocp-Apim-Subscription-Key": "{API key}",
5-
"modelId": "{modelId}",
6-
"resultId": "{result Id}",
5+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
6+
"resultId": "3b1e6c5b-e113-4114-ab6b-ce65dfe8050f",
77
"body": {}
88
},
99
"responses": {

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/BusinessCardBatch.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"responses": {
1111
"202": {
1212
"headers": {
13-
"Operation-Location": "{endpoint}/formrecognizer/v2.1/prebuilt/businessCard/analyzeResults/{resultId}"
13+
"Operation-Location": "{endpoint}/formrecognizer/v2.1/prebuilt/businessCard/analyzeResults/3b1e6c5b-e113-4114-ab6b-ce65dfe8050f"
1414
}
1515
}
1616
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/BusinessCardBatchResult.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"parameters": {
33
"endpoint": "{endpoint}",
44
"Ocp-Apim-Subscription-Key": "{API key}",
5-
"resultId": "{result Id}",
5+
"resultId": "3b1e6c5b-e113-4114-ab6b-ce65dfe8050f",
66
"body": {}
77
},
88
"responses": {

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/ComposeModels.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
"responses": {
1515
"201": {
1616
"headers": {
17-
"Location": "{endpoint}/formrecognizer/v2.1/custom/models/{modelId}"
17+
"Location": "{endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8"
1818
}
1919
}
2020
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/CopyModel.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"endpoint": "{endpoint}",
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
6-
"modelId": "{modelId}",
6+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
77
"body": {},
88
"copyRequest": {
99
"targetResourceId": "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.CognitiveServices/accounts/{resourceName}",
1010
"targetResourceRegion": "westus2",
1111
"copyAuthorization": {
12-
"modelId": "{modelId}",
12+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
1313
"accessToken": "{accessToken}",
1414
"expirationDateTimeTicks": 86400
1515
}
@@ -18,7 +18,7 @@
1818
"responses": {
1919
"202": {
2020
"headers": {
21-
"Operation-Location": "{endpoint}/formrecognizer/v2.1/custom/models/{modelId}/copyResults/{resultId}"
21+
"Operation-Location": "{endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8/copyResults/3b1e6c5b-e113-4114-ab6b-ce65dfe8050f"
2222
}
2323
}
2424
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/CopyModelAuthorization.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,10 @@
88
"responses": {
99
"201": {
1010
"headers": {
11-
"Location": "{endpoint}/formrecognizer/v2.1/custom/models/{modelId}"
11+
"Location": "{endpoint}/formrecognizer/v2.1/custom/models/f973e3c1-1148-43bb-bea8-49d0603ab3a8"
1212
},
1313
"body": {
14-
"modelId": "{modelId}",
14+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
1515
"accessToken": "{accessToken}",
1616
"expirationDateTimeTicks": 86400
1717
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/CopyOperationResult.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"endpoint": "{endpoint}",
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
6-
"modelId": "{modelId}",
7-
"resultId": "{resultId}",
6+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
7+
"resultId": "3b1e6c5b-e113-4114-ab6b-ce65dfe8050f",
88
"body": {}
99
},
1010
"responses": {
@@ -14,7 +14,7 @@
1414
"createdDateTime": "2020-01-01T00:00:00Z",
1515
"lastUpdatedDateTime": "2020-01-01T00:01:00Z",
1616
"copyResult": {
17-
"modelId": "{modelId}",
17+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
1818
"errors": []
1919
}
2020
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/v2.1/examples/CopyOperationResultWithErrors.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
"endpoint": "{endpoint}",
44
"Content-Type": "application/json",
55
"Ocp-Apim-Subscription-Key": "{API key}",
6-
"modelId": "{modelId}",
7-
"resultId": "{resultId}",
6+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
7+
"resultId": "3b1e6c5b-e113-4114-ab6b-ce65dfe8050f",
88
"body": {}
99
},
1010
"responses": {
@@ -14,7 +14,7 @@
1414
"createdDateTime": "2020-01-01T00:00:00Z",
1515
"lastUpdatedDateTime": "2020-01-01T00:01:00Z",
1616
"copyResult": {
17-
"modelId": "{modelId}",
17+
"modelId": "f973e3c1-1148-43bb-bea8-49d0603ab3a8",
1818
"errors": [
1919
{
2020
"code": "ResourceResolverError",

0 commit comments

Comments
 (0)