Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
mfriesen committed Jun 11, 2024
1 parent e4855f2 commit b754e0b
Show file tree
Hide file tree
Showing 12 changed files with 174 additions and 147 deletions.
17 changes: 10 additions & 7 deletions docs/openapi/openapi-iam.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8737,6 +8737,11 @@
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: object
properties:
Expand All @@ -8745,9 +8750,8 @@
description: 'OCR: Parse types - TEXT, FORMS, TABLES'
ocrEngine:
$ref: '#/components/schemas/OcrEngine'
ocrExportToCsv:
type: string
description: Convert OCR result to CSV (textract table only)
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
Expand Down Expand Up @@ -8812,9 +8816,8 @@
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
SetDocumentOcrRequest:
required:
- content
Expand Down
17 changes: 10 additions & 7 deletions docs/openapi/openapi-jwt.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8737,6 +8737,11 @@
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: object
properties:
Expand All @@ -8745,9 +8750,8 @@
description: 'OCR: Parse types - TEXT, FORMS, TABLES'
ocrEngine:
$ref: '#/components/schemas/OcrEngine'
ocrExportToCsv:
type: string
description: Convert OCR result to CSV (textract table only)
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
Expand Down Expand Up @@ -8812,9 +8816,8 @@
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
SetDocumentOcrRequest:
required:
- content
Expand Down
17 changes: 10 additions & 7 deletions docs/openapi/openapi-key.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1923,7 +1923,7 @@
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8737,6 +8737,11 @@
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: object
properties:
Expand All @@ -8745,9 +8750,8 @@
description: 'OCR: Parse types - TEXT, FORMS, TABLES'
ocrEngine:
$ref: '#/components/schemas/OcrEngine'
ocrExportToCsv:
type: string
description: Convert OCR result to CSV (textract table only)
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
Expand Down Expand Up @@ -8812,9 +8816,8 @@
ocrNumberOfPages:
type: string
description: Number of pages to OCR (from start) (-1 all)
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: '#/components/schemas/OcrOutputType'
SetDocumentOcrRequest:
required:
- content
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ Resources:
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8821,6 +8821,11 @@ Resources:
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: "object"
properties:
Expand All @@ -8829,9 +8834,8 @@ Resources:
description: "OCR: Parse types - TEXT, FORMS, TABLES"
ocrEngine:
$ref: "#/components/schemas/OcrEngine"
ocrExportToCsv:
type: string
description: "Convert OCR result to CSV (textract table only)"
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
Expand Down Expand Up @@ -8896,9 +8900,8 @@ Resources:
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
SetDocumentOcrRequest:
required:
- "content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ Resources:
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8821,6 +8821,11 @@ Resources:
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: "object"
properties:
Expand All @@ -8829,9 +8834,8 @@ Resources:
description: "OCR: Parse types - TEXT, FORMS, TABLES"
ocrEngine:
$ref: "#/components/schemas/OcrEngine"
ocrExportToCsv:
type: string
description: "Convert OCR result to CSV (textract table only)"
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
Expand Down Expand Up @@ -8896,9 +8900,8 @@ Resources:
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
SetDocumentOcrRequest:
required:
- "content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1938,7 +1938,7 @@ Resources:
| -------- | ------- | ------- | ------- |
| OCR | ocrParseTypes | Ocr Parsing strategy to use | TEXT, FORMS, TABLES |
| OCR | ocrEngine | Ocr Engine to use | tesseract or textract |
| OCR | ocrExportToCsv | Convert OCR result to CSV (textract table only) | true |
| OCR | ocrOutputType | Convert OCR result to an Output format (textract table only) | true |
| OCR | ocrNumberOfPages | Number of pages to OCR (from start) | -1 |
| OCR | addPdfDetectedCharactersAsText | PDF Documents convert images to text | true or false |
| FULLTEXT | characterMax | Maximum number of characters to add to Fulltext destination | -1 |
Expand Down Expand Up @@ -8821,6 +8821,11 @@ Resources:
enum:
- TESSERACT
- TEXTRACT
OcrOutputType:
type: string
description: OCR Engine output format (textract table only)
enum:
- CSV
AddActionParameters:
type: "object"
properties:
Expand All @@ -8829,9 +8834,8 @@ Resources:
description: "OCR: Parse types - TEXT, FORMS, TABLES"
ocrEngine:
$ref: "#/components/schemas/OcrEngine"
ocrExportToCsv:
type: string
description: "Convert OCR result to CSV (textract table only)"
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
Expand Down Expand Up @@ -8896,9 +8900,8 @@ Resources:
ocrNumberOfPages:
type: "string"
description: "Number of pages to OCR (from start) (-1 all)"
ocrExportToCsv:
type: boolean
description: Whether to Export to CSV
ocrOutputType:
$ref: "#/components/schemas/OcrOutputType"
SetDocumentOcrRequest:
required:
- "content"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@
import com.formkiq.client.model.MappingAttribute;
import com.formkiq.client.model.MappingAttributeLabelMatchingType;
import com.formkiq.client.model.MappingAttributeSourceType;
import com.formkiq.client.model.OcrOutputType;
import org.junit.jupiter.api.BeforeEach;
import org.junit.jupiter.api.Test;
import com.formkiq.aws.dynamodb.DynamicObject;
Expand Down Expand Up @@ -180,7 +181,7 @@ public void testHandlePostDocumentActions01() throws Exception {
AddDocumentActionsRequest req = new AddDocumentActionsRequest().actions(Arrays.asList(
new AddAction().type(DocumentActionType.OCR)
.parameters(new AddActionParameters().addPdfDetectedCharactersAsText("true")
.ocrExportToCsv("true").ocrParseTypes("text")),
.ocrOutputType(OcrOutputType.CSV).ocrParseTypes("text")),
new AddAction().type(DocumentActionType.WEBHOOK)
.parameters(new AddActionParameters().url("https://localhost"))));

Expand All @@ -200,7 +201,7 @@ public void testHandlePostDocumentActions01() throws Exception {

assertEquals(ActionType.OCR, actions.get(i).type());
assertEquals(ActionStatus.PENDING, actions.get(i).status());
assertEquals("{ocrParseTypes=text, ocrExportToCsv=true, addPdfDetectedCharactersAsText=true}",
assertEquals("{ocrParseTypes=text, ocrOutputType=CSV, addPdfDetectedCharactersAsText=true}",
actions.get(i++).parameters().toString());

assertEquals(ActionType.WEBHOOK, actions.get(i).type());
Expand Down
Loading

0 comments on commit b754e0b

Please sign in to comment.