Skip to content

Commit

Permalink
Merge pull request #49 from gkumbhat/convert_content_to_batch
Browse files Browse the repository at this point in the history
🧑‍💻 Replace content endpoint with batch endpoint
  • Loading branch information
gkumbhat authored May 24, 2024
2 parents 34f04ff + 8afaa9b commit 352d918
Showing 1 changed file with 32 additions and 22 deletions.
54 changes: 32 additions & 22 deletions docs/api/openapi_detector_api.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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: >-
Expand All @@ -26,7 +26,7 @@ paths:
content:
application/json:
schema:
$ref: '#/components/schemas/TextAnalysisHttpRequest'
$ref: '#/components/schemas/ContentAnalysisHttpRequest'
responses:
'200':
description: Successful Response
Expand All @@ -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:
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 352d918

Please sign in to comment.