-
Notifications
You must be signed in to change notification settings - Fork 21
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #49 from gkumbhat/convert_content_to_batch
🧑💻 Replace content endpoint with batch endpoint
- Loading branch information
Showing
1 changed file
with
32 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ info: | |
url: https://www.apache.org/licenses/LICENSE-2.0.html | ||
version: 0.0.1 | ||
paths: | ||
/api/v1/text/content: | ||
/api/v1/text/contents: | ||
post: | ||
summary: Text Content Analysis Unary Handler | ||
description: >- | ||
|
@@ -26,7 +26,7 @@ paths: | |
content: | ||
application/json: | ||
schema: | ||
$ref: '#/components/schemas/TextAnalysisHttpRequest' | ||
$ref: '#/components/schemas/ContentAnalysisHttpRequest' | ||
responses: | ||
'200': | ||
description: Successful Response | ||
|
@@ -35,21 +35,22 @@ paths: | |
schema: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/TextAnalysisResponse' | ||
$ref: '#/components/schemas/ContentsAnalysisResponse' | ||
title: >- | ||
Response Text Content Analysis Unary Handler Api V1 Text | ||
Content Post | ||
example: | ||
- start: 15 | ||
end: 25 | ||
detection_type: pii | ||
detection: EmailAddress | ||
score: 0.99 | ||
- start: 105 | ||
end: 116 | ||
detection_type: pii | ||
detection: SocialSecurity | ||
score: 0.99 | ||
- | ||
- start: 15 | ||
end: 25 | ||
detection_type: pii | ||
detection: EmailAddress | ||
score: 0.99 | ||
- start: 105 | ||
end: 116 | ||
detection_type: pii | ||
detection: SocialSecurity | ||
score: 0.99 | ||
'404': | ||
description: Resource Not Found | ||
content: | ||
|
@@ -501,19 +502,28 @@ components: | |
Methods can be added to enumerations, and members can have their own | ||
attributes -- see the documentation for details. | ||
TextAnalysisHttpRequest: | ||
ContentAnalysisHttpRequest: | ||
properties: | ||
content: | ||
type: string | ||
title: Content | ||
example: >- | ||
Your email is [email protected]! Only the next instance of email will be | ||
processed. [email protected]. Your SSN is 123-45-6789. | ||
contents: | ||
type: array | ||
title: Contents | ||
description: >- | ||
Field allowing users to provide list of documents for analysis. Note, results of this endpoint will contain | ||
analysis / detection of each of the provided documents in the order they are present in the `contents` object. | ||
items: | ||
type: string | ||
example: >- | ||
Your email is [email protected]! Only the next instance of email will be | ||
processed. [email protected]. Your SSN is 123-45-6789. | ||
type: object | ||
required: | ||
- content | ||
- contents | ||
title: TextAnalysisHttpRequest | ||
TextAnalysisResponse: | ||
ContentsAnalysisResponse: | ||
type: array | ||
items: | ||
$ref: '#/components/schemas/ContentAnalysisResponse' | ||
ContentAnalysisResponse: | ||
properties: | ||
start: | ||
type: integer | ||
|