Skip to content

Commit

Permalink
FormRecognizer: Updating Train API to take optional parameter. (#6176)
Browse files Browse the repository at this point in the history
* Initial commit.

* Incorporating PR feedback

* Adding examples, cleanup.

* Fixing json syntax errors.

* Incorporating feedback.

* Refactor swagger to common type.

* Incorporating feedback.

* Moved to preview, refactor, fixes.

* Updated text.

* Minor text change.

* More minor text updates.

* Reverting accidental change

* Refactor

* Refactor, Adding GetModels REST API placeholder

* Refactor, fixes

* Refactor, Updated definitions.

* Fix type definition

* model* API endpoint updated

* Fix build issue, Reverting change to face swagger

* updated namespace

* Updated return type for /models api

* Update FormRecognizer.json

fix paths of methods (add custom) and fix path of hosttemplate

* Refactor, opid changes.

* removing multi as it causing autorest codegen issues with langs like go, ruby etc.

* reverting face.json changes.

* renamed example, fixed typo in example to make it valid json

* API review feedback, Reverting OpIds

* API review feedback, fixing examples for model verification

* Fixing examples for model validation

* Capturing feedback from API Review

* Capturing feedback from API review

* Fix generated code path, Fix generated SDK class name

* Update title to be used for SDK code generation

* Updating help text.

* Update help text.

* Update help text.

* Initial commit.

* merging receipts with FR

* update for receipt

* Receipt merge update

* add receipt ref, update ocr json

* fix readme

* Fix Receipt swagger title field

* Fixing receipt API verification issues.

* fixing build issues

* removing empty lines.

* adding description for understandingResult

* Adding reference to Ocr swagger.

* Trimming OCR to remove unreferenced definitions.

* Adding missing definitions.

* Fixing build issues.

* Adding updated OCR reference.

* fix version

* fixing typo

* capturing feedback from API PR review.

* Adding optional support for subfolders in source parameter to Train API.

* Adding optional support for subfolders in source parameter to Train API.

* adding example for updated Train API

* Minor fix to sawgger, removed merged swagger.

* Minor text fix.
  • Loading branch information
ramparab authored and jhendrixMSFT committed Jun 7, 2019
1 parent 66757fa commit 6f022e4
Show file tree
Hide file tree
Showing 2 changed files with 78 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@
"x-ms-examples": {
"Train new model example": {
"$ref": "./examples/Train.json"
},
"Train new model example, subfolder filter options": {
"$ref": "./examples/TrainWithSubFolders.json"
}
}
}
Expand Down Expand Up @@ -296,6 +299,26 @@
"maxLength": 2048,
"minLength": 0,
"type": "string"
},
"sourceFilter":{
"$ref":"#/definitions/TrainSourceFilter",
"description":"Get or set filter to further search the\r\nsource path for content."
}
}
},
"TrainSourceFilter":{
"description":"Filters to be applied when traversing a data source.",
"type":"object",
"properties":{
"prefix":{
"description":"A case-sensitive prefix string to filter content\r\nunder the source location. For e.g., when using a Azure Blob\r\nUri use the prefix to restrict subfolders for content.",
"maxLength":128,
"minLength":0,
"type":"string"
},
"includeSubFolders":{
"description":"A flag to indicate if sub folders within the set of\r\nprefix folders will also need to be included when searching\r\nfor content to be preprocessed.",
"type":"boolean"
}
}
},
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
{
"parameters": {
"Endpoint": "{Endpoint}",
"Content-Type": "application/json",
"Ocp-Apim-Subscription-Key": "{API key}",
"body": {},
"trainRequest": {
"source": "/input/data",
"sourceFilter": {
"prefix": "",
"includeSubFolders": false
}
}
},
"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": []
}
}
}
}

0 comments on commit 6f022e4

Please sign in to comment.