Skip to content

Commit 06e0a7f

Browse files
authored
Update documentation for FormRecognizer 2022-08-31 (Azure#28820)
* Update documentation for FormRecognizer 2022-08-31 * fix model validation errors
1 parent e3d8641 commit 06e0a7f

15 files changed

+41
-89
lines changed

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/FormRecognizer.json

Lines changed: 12 additions & 60 deletions
Original file line numberDiff line numberDiff line change
@@ -32,12 +32,8 @@
3232
"paths": {
3333
"/documentModels/{modelId}:analyze": {
3434
"post": {
35-
"summary": "Analyze document",
3635
"description": "Analyzes document with document model.",
37-
"operationId": "AnalyzeDocument",
38-
"tags": [
39-
"Analysis"
40-
],
36+
"operationId": "DocumentModels_AnalyzeDocument",
4137
"consumes": [
4238
"application/json",
4339
"application/octet-stream",
@@ -107,12 +103,8 @@
107103
},
108104
"/documentModels/{modelId}/analyzeResults/{resultId}": {
109105
"get": {
110-
"summary": "Get analyze result",
111106
"description": "Gets the result of document analysis.",
112-
"operationId": "GetAnalyzeDocumentResult",
113-
"tags": [
114-
"Analysis"
115-
],
107+
"operationId": "DocumentModels_GetAnalyzeResult",
116108
"consumes": [],
117109
"produces": [
118110
"application/json"
@@ -151,12 +143,8 @@
151143
},
152144
"/documentModels:build": {
153145
"post": {
154-
"summary": "Build document model",
155146
"description": "Builds a custom document analysis model.",
156-
"operationId": "BuildDocumentModel",
157-
"tags": [
158-
"Creation"
159-
],
147+
"operationId": "DocumentModels_BuildModel",
160148
"consumes": [
161149
"application/json"
162150
],
@@ -204,12 +192,8 @@
204192
},
205193
"/documentModels:compose": {
206194
"post": {
207-
"summary": "Compose document model",
208195
"description": "Creates a new document model from document types of existing document models.",
209-
"operationId": "ComposeDocumentModel",
210-
"tags": [
211-
"Creation"
212-
],
196+
"operationId": "DocumentModels_ComposeModel",
213197
"consumes": [
214198
"application/json"
215199
],
@@ -257,12 +241,8 @@
257241
},
258242
"/documentModels:authorizeCopy": {
259243
"post": {
260-
"summary": "Generate copy authorization",
261244
"description": "Generates authorization to copy a document model to this location with specified modelId and optional description.",
262-
"operationId": "AuthorizeCopyDocumentModel",
263-
"tags": [
264-
"Creation"
265-
],
245+
"operationId": "DocumentModels_AuthorizeModelCopy",
266246
"consumes": [
267247
"application/json"
268248
],
@@ -306,12 +286,8 @@
306286
},
307287
"/documentModels/{modelId}:copyTo": {
308288
"post": {
309-
"summary": "Copy document model",
310289
"description": "Copies document model to the target resource, region, and modelId.",
311-
"operationId": "CopyDocumentModelTo",
312-
"tags": [
313-
"Creation"
314-
],
290+
"operationId": "DocumentModels_CopyModelTo",
315291
"consumes": [
316292
"application/json"
317293
],
@@ -362,12 +338,8 @@
362338
},
363339
"/operations": {
364340
"get": {
365-
"summary": "List operations",
366341
"description": "Lists all operations.",
367-
"operationId": "GetOperations",
368-
"tags": [
369-
"Operation"
370-
],
342+
"operationId": "Miscellaneous_ListOperations",
371343
"consumes": [],
372344
"produces": [
373345
"application/json"
@@ -404,12 +376,8 @@
404376
},
405377
"/operations/{operationId}": {
406378
"get": {
407-
"summary": "Get operation",
408379
"description": "Gets operation info.",
409-
"operationId": "GetOperation",
410-
"tags": [
411-
"Operation"
412-
],
380+
"operationId": "Miscellaneous_GetOperation",
413381
"consumes": [],
414382
"produces": [
415383
"application/json"
@@ -445,12 +413,8 @@
445413
},
446414
"/documentModels": {
447415
"get": {
448-
"summary": "List document models",
449416
"description": "List all document models",
450-
"operationId": "GetDocumentModels",
451-
"tags": [
452-
"Management"
453-
],
417+
"operationId": "DocumentModels_ListModels",
454418
"consumes": [],
455419
"produces": [
456420
"application/json"
@@ -487,12 +451,8 @@
487451
},
488452
"/documentModels/{modelId}": {
489453
"get": {
490-
"summary": "Get document model",
491454
"description": "Gets detailed document model information.",
492-
"operationId": "GetDocumentModel",
493-
"tags": [
494-
"Management"
495-
],
455+
"operationId": "DocumentModels_GetModel",
496456
"consumes": [],
497457
"produces": [
498458
"application/json"
@@ -529,12 +489,8 @@
529489
}
530490
},
531491
"delete": {
532-
"summary": "Delete document model",
533492
"description": "Deletes document model.",
534-
"operationId": "DeleteDocumentModel",
535-
"tags": [
536-
"Management"
537-
],
493+
"operationId": "DocumentModels_DeleteModel",
538494
"consumes": [],
539495
"produces": [
540496
"application/json"
@@ -567,12 +523,8 @@
567523
},
568524
"/info": {
569525
"get": {
570-
"summary": "Get resource info",
571526
"description": "Return information about the current resource.",
572-
"operationId": "GetResourceDetails",
573-
"tags": [
574-
"Management"
575-
],
527+
"operationId": "Miscellaneous_GetResourceInfo",
576528
"consumes": [],
577529
"produces": [
578530
"application/json"

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/AnalyzeDocument_Base64.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,19 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "prebuilt-layout",
66
"pages": "1-2,4",
77
"locale": "en-US",
88
"stringIndexType": "textElements",
99
"analyzeRequest": {
10-
"base64Source": "{base64EncodedPdf}"
10+
"base64Source": ""
1111
}
1212
},
1313
"responses": {
1414
"202": {
1515
"headers": {
16-
"Operation-Location": "{endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version={apiVersion}"
16+
"Operation-Location": "{endpoint}/formrecognizer/documentModels/prebuilt-layout/analyzeResults/{resultId}?api-version=2022-08-31"
1717
}
1818
}
1919
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/AnalyzeDocument_Url.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "customModel",
66
"pages": "1-2,4",
77
"locale": "en-US",
@@ -13,7 +13,7 @@
1313
"responses": {
1414
"202": {
1515
"headers": {
16-
"Operation-Location": "{endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version={apiVersion}"
16+
"Operation-Location": "{endpoint}/formrecognizer/documentModels/customModel/analyzeResults/{resultId}?api-version=2022-08-31"
1717
}
1818
}
1919
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/AuthorizeCopyDocumentModel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"authorizeCopyRequest": {
66
"modelId": "{targetModelId}",
77
"description": "{targetModelDescription}"
@@ -13,7 +13,7 @@
1313
"targetResourceId": "{targetResourceId}",
1414
"targetResourceRegion": "{targetResourceRegion}",
1515
"targetModelId": "{targetModelId}",
16-
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/{targetModelId}?api-version={apiVersion}",
16+
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/{targetModelId}?api-version=2022-08-31",
1717
"accessToken": "{accessToken}",
1818
"expirationDateTime": "2021-09-23T09:12:54.552Z"
1919
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/BuildDocumentModel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"buildRequest": {
66
"modelId": "{modelId}",
77
"description": "{modelDescription}",
@@ -18,7 +18,7 @@
1818
"responses": {
1919
"202": {
2020
"headers": {
21-
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version={apiVersion}"
21+
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31"
2222
}
2323
}
2424
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/ComposeDocumentModel.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"composeRequest": {
66
"modelId": "{composedModelId}",
77
"description": "{composedModelDescription}",
@@ -18,7 +18,7 @@
1818
"responses": {
1919
"202": {
2020
"headers": {
21-
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version={apiVersion}"
21+
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31"
2222
}
2323
}
2424
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/CopyDocumentModelTo.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "sourceModel",
66
"copyToRequest": {
77
"targetResourceId": "{targetResourceId}",
88
"targetResourceRegion": "{targetResourceRegion}",
99
"targetModelId": "targetModel",
10-
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/targetModel?api-version={apiVersion}",
10+
"targetModelLocation": "{targetEndpoint}/formrecognizer/documentModels/targetModel?api-version=2022-08-31",
1111
"accessToken": "{accessToken}",
1212
"expirationDateTime": "2021-09-23T09:12:54.552Z"
1313
}
1414
},
1515
"responses": {
1616
"202": {
1717
"headers": {
18-
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version={apiVersion}"
18+
"Operation-Location": "{endpoint}/formrecognizer/operations/{operationId}?api-version=2022-08-31"
1919
}
2020
}
2121
}

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/DeleteDocumentModel.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "{modelId}"
66
},
77
"responses": {

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/GetAnalyzeDocumentResult.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "prebuilt-invoice",
66
"resultId": "{resultId}"
77
},
@@ -12,7 +12,7 @@
1212
"createdDateTime": "2021-09-24T13:00:46Z",
1313
"lastUpdatedDateTime": "2021-09-24T13:00:49Z",
1414
"analyzeResult": {
15-
"apiVersion": "{apiVersion}",
15+
"apiVersion": "2022-08-31",
1616
"modelId": "prebuilt-invoice",
1717
"stringIndexType": "textElements",
1818
"content": "CONTOSO LTD.\nINVOICE\nContoso Headquarters\nINVOICE: INV-100\n123 456th St\nINVOICE DATE: 11/15/2019\nNew York, NY, 10001\nDUE DATE: 12/15/2019\nCUSTOMER NAME: MICROSOFT CORPORATION\nSERVICE PERIOD: 10/14/2019 – 11/14/2019\nCUSTOMER ID: CID-12345\nMicrosoft Corp\n123 Other St,\nRedmond WA, 98052\nBILL TO:\nSHIP TO:\nSERVICE ADDRESS:\nMicrosoft Finance\nMicrosoft Delivery\nMicrosoft Services\n123 Bill St,\n123 Ship St,\n123 Service St,\nRedmond WA, 98052\nRedmond WA, 98052\nRedmond WA, 98052\nSALESPERSON\nP.O. NUMBER\nREQUISITIONER\nSHIPPED VIA\nF.O.B. POINT\nTERMS\nPO-3333\nDATE\nITEM CODE\nDESCRIPTION\nQTY\nUM\nPRICE\nTAX\nAMOUNT\n3/4/2021\nA123\nConsulting Services\n2\nhours\n$30.00\n10%\n$60.00\n3/5/2021\nB456\nDocument Fee\n3\n$10.00\n5%\n$30.00\n3/6/2021\nC789\nPrinting Fee\n10\npages\n$1.00\n20%\n$10.00\nSUBTOTAL\n$100.00\nSALES TAX\n$10.00\nTOTAL\n$110.00\nPREVIOUS UNPAID BALANCE\n$500.00\nAMOUNT DUE\n$610.00\nTHANK YOU FOR YOUR BUSINESS!\nREMIT TO:\nContoso Billing\n123 Remit St\nNew York, NY, 10001\n:unselected:",

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/GetDocumentModel_Custom.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "{customModelId}"
66
},
77
"responses": {
@@ -10,7 +10,7 @@
1010
"modelId": "{customModelId}",
1111
"description": "{customModelDescription}",
1212
"createdDateTime": "2021-09-24T12:54:35Z",
13-
"apiVersion": "{apiVersion}",
13+
"apiVersion": "2022-08-31",
1414
"docTypes": {
1515
"{docType}": {
1616
"fieldSchema": {

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/GetDocumentModel_Prebuilt.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"modelId": "prebuilt-invoice"
66
},
77
"responses": {
@@ -10,7 +10,7 @@
1010
"modelId": "prebuilt-invoice",
1111
"description": "Prebuilt model to extract key information from English invoices, including customer, vendor, invoice ID, due date, total, and more.",
1212
"createdDateTime": "2021-07-30T00:00:00Z",
13-
"apiVersion": "{apiVersion}",
13+
"apiVersion": "2022-08-31",
1414
"docTypes": {
1515
"prebuilt:invoice": {
1616
"fieldSchema": {

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/GetDocumentModels.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}"
4+
"api-version": "2022-08-31"
55
},
66
"responses": {
77
"200": {
@@ -11,13 +11,13 @@
1111
"modelId": "prebuilt-layout",
1212
"createdDateTime": "2021-07-30T00:00:00Z",
1313
"description": "Prebuilt model to extract text, selection marks, tables, and other layout information.",
14-
"apiVersion": "{apiVersion}"
14+
"apiVersion": "2022-08-31"
1515
},
1616
{
1717
"modelId": "myCustomModel",
1818
"createdDateTime": "2021-09-24T12:54:35Z",
1919
"description": "{modelDescription}",
20-
"apiVersion": "{apiVersion}"
20+
"apiVersion": "2022-08-31"
2121
}
2222
],
2323
"nextLink": "{nextLinkUrl}"

specification/cognitiveservices/data-plane/FormRecognizer/stable/2022-08-31/examples/GetOperation.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"parameters": {
33
"endpoint": "{endpoint}",
4-
"api-version": "{apiVersion}",
4+
"api-version": "2022-08-31",
55
"operationId": "{operationId}"
66
},
77
"responses": {
@@ -18,7 +18,7 @@
1818
"modelId": "{customModelId}",
1919
"description": "{customModelDescription}",
2020
"createdDateTime": "2021-09-23T09:13:01Z",
21-
"apiVersion": "{apiVersion}"
21+
"apiVersion": "2022-08-31"
2222
}
2323
}
2424
}

0 commit comments

Comments
 (0)