Merged in feature/remove-query (pull request #201)
remove query from codebase part 1 * remove query * fix localstack run
This commit is contained in:
+2
-307
@@ -27,8 +27,6 @@ tags:
|
||||
description: Operations related to document labels and workflow tracking
|
||||
- name: FieldExtractionService
|
||||
description: Operations related to document field extractions
|
||||
- name: QueryService
|
||||
description: Operations related to queries
|
||||
- name: ExportService
|
||||
description: Operations related to exports
|
||||
- name: AuthService
|
||||
@@ -160,162 +158,7 @@ paths:
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
/query:
|
||||
get:
|
||||
operationId: listQueries
|
||||
tags:
|
||||
- QueryService
|
||||
summary: List queries
|
||||
description: Retrieves a list of queries based on filter criteria.
|
||||
security:
|
||||
- jwtAuth: []
|
||||
responses:
|
||||
"200":
|
||||
description: A list of queries.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/ListQueries"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
post:
|
||||
operationId: createQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Create a new query
|
||||
description: Creates a new query with the provided details.
|
||||
security:
|
||||
- jwtAuth: []
|
||||
requestBody:
|
||||
description: The details required to create a query
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/QueryCreate"
|
||||
responses:
|
||||
"201":
|
||||
description: Query created successfully.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/IdMessage"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
/query/{id}:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/QueryID"
|
||||
get:
|
||||
operationId: getQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Get a query by ID
|
||||
description: Retrieves a specific query by its ID.
|
||||
security:
|
||||
- jwtAuth: []
|
||||
responses:
|
||||
"200":
|
||||
description: Query details.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Query"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
patch:
|
||||
operationId: updateQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Update a query
|
||||
description: Updates an existing query with new details.
|
||||
security:
|
||||
- jwtAuth: []
|
||||
requestBody:
|
||||
description: The update values for the desired query.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/QueryUpdate"
|
||||
responses:
|
||||
"200":
|
||||
description: Query updated successfully.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
|
||||
/query/{id}/test:
|
||||
parameters:
|
||||
- $ref: "#/components/parameters/QueryID"
|
||||
post:
|
||||
operationId: testQuery
|
||||
tags:
|
||||
- QueryService
|
||||
summary: Test a query
|
||||
description: Executes a test run of a query with the provided parameters.
|
||||
security:
|
||||
- jwtAuth: []
|
||||
requestBody:
|
||||
description: The query test requirements.
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/QueryTestRequest"
|
||||
responses:
|
||||
"200":
|
||||
description: Test result.
|
||||
headers:
|
||||
RateLimit:
|
||||
$ref: "#/components/headers/RateLimit"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/QueryTestResponse"
|
||||
"400":
|
||||
$ref: "#/components/responses/InvalidRequest"
|
||||
"401":
|
||||
$ref: "#/components/responses/Unauthorized"
|
||||
"429":
|
||||
$ref: "#/components/responses/TooManyRequests"
|
||||
"500":
|
||||
$ref: "#/components/responses/InternalError"
|
||||
# Query paths have been removed - see remove_query_plan.md
|
||||
|
||||
/client/{id}/status:
|
||||
parameters:
|
||||
@@ -1912,13 +1755,7 @@ components:
|
||||
$ref: "#/components/schemas/ExportID"
|
||||
description: The export ID.
|
||||
|
||||
QueryID:
|
||||
in: path
|
||||
name: id
|
||||
required: true
|
||||
schema:
|
||||
$ref: "#/components/schemas/QueryID"
|
||||
description: The ID of the query.
|
||||
# QueryID parameter has been removed - see remove_query_plan.md
|
||||
|
||||
DocumentID:
|
||||
in: path
|
||||
@@ -2078,13 +1915,6 @@ components:
|
||||
maxLength: 36
|
||||
pattern: "^.+$"
|
||||
|
||||
QueryID:
|
||||
type: string
|
||||
format: uuid
|
||||
description: The query id.
|
||||
example: 019580df-ef65-7676-8de9-94435a93337a
|
||||
maxLength: 36
|
||||
|
||||
DocumentID:
|
||||
type: string
|
||||
format: uuid
|
||||
@@ -2255,109 +2085,6 @@ components:
|
||||
type: boolean
|
||||
description: If the client is allowing active syncs
|
||||
|
||||
QueryType:
|
||||
type: string
|
||||
enum:
|
||||
- JSON_EXTRACTOR
|
||||
- CONTEXT_FULL
|
||||
description: Specifies the type of the query.
|
||||
|
||||
QueryConfig:
|
||||
type: string
|
||||
description: Configuration for the query.
|
||||
maxLength: 2048
|
||||
pattern: '^\{.*\}$'
|
||||
|
||||
Query:
|
||||
description: A logic unit of execution.
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
$ref: "#/components/schemas/QueryID"
|
||||
type:
|
||||
$ref: "#/components/schemas/QueryType"
|
||||
active_version:
|
||||
$ref: "#/components/schemas/Version"
|
||||
latest_version:
|
||||
$ref: "#/components/schemas/Version"
|
||||
config:
|
||||
$ref: "#/components/schemas/QueryConfig"
|
||||
required_queries:
|
||||
$ref: "#/components/schemas/RequiredQueryIDs"
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
- active_version
|
||||
- latest_version
|
||||
|
||||
ListQueries:
|
||||
description: A set of queries.
|
||||
type: object
|
||||
properties:
|
||||
queries:
|
||||
type: array
|
||||
maxItems: 512
|
||||
items:
|
||||
$ref: "#/components/schemas/Query"
|
||||
description: List of queries.
|
||||
required:
|
||||
- queries
|
||||
|
||||
QueryCreate:
|
||||
description: The parameters required to create a query.
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
$ref: "#/components/schemas/QueryType"
|
||||
config:
|
||||
$ref: "#/components/schemas/QueryConfig"
|
||||
required_queries:
|
||||
$ref: "#/components/schemas/RequiredQueryIDs"
|
||||
required:
|
||||
- type
|
||||
|
||||
RequiredQueryIDs:
|
||||
type: array
|
||||
maxItems: 256
|
||||
items:
|
||||
$ref: "#/components/schemas/QueryID"
|
||||
description: List of required query IDs.
|
||||
|
||||
QueryUpdate:
|
||||
description: The properties that may be updated for a query.
|
||||
type: object
|
||||
properties:
|
||||
config:
|
||||
$ref: "#/components/schemas/QueryConfig"
|
||||
active_version:
|
||||
$ref: "#/components/schemas/Version"
|
||||
required_queries:
|
||||
$ref: "#/components/schemas/RequiredQueryIDs"
|
||||
|
||||
QueryTestRequest:
|
||||
description: The properties for a query test request.
|
||||
type: object
|
||||
properties:
|
||||
document_id:
|
||||
$ref: "#/components/schemas/DocumentID"
|
||||
query_version:
|
||||
$ref: "#/components/schemas/Version"
|
||||
required:
|
||||
- document_id
|
||||
- query_version
|
||||
|
||||
QueryTestResponse:
|
||||
description: The response from a query test.
|
||||
type: object
|
||||
properties:
|
||||
value:
|
||||
type: string
|
||||
description: Result of the query test.
|
||||
pattern: "^.+$"
|
||||
maxLength: 2048
|
||||
required:
|
||||
- value
|
||||
|
||||
DocClient:
|
||||
description: The properties of a client.
|
||||
type: object
|
||||
@@ -2451,7 +2178,6 @@ components:
|
||||
- id
|
||||
- client_id
|
||||
- hash
|
||||
- fields
|
||||
- hasTextRecord
|
||||
- labels
|
||||
properties:
|
||||
@@ -2461,13 +2187,6 @@ components:
|
||||
$ref: "#/components/schemas/ClientID"
|
||||
hash:
|
||||
$ref: "#/components/schemas/Hash"
|
||||
fields:
|
||||
type: object
|
||||
description: "The fields and the value for the document"
|
||||
example:
|
||||
property1: "string value"
|
||||
property2: 42
|
||||
property3: true
|
||||
hasTextRecord:
|
||||
type: boolean
|
||||
description: "Whether a text extraction (field extraction) record exists for this document"
|
||||
@@ -2603,24 +2322,14 @@ components:
|
||||
$ref: "#/components/schemas/CodeVersion"
|
||||
minimum_text_version:
|
||||
$ref: "#/components/schemas/CodeVersion"
|
||||
fields:
|
||||
$ref: "#/components/schemas/CollectorFields"
|
||||
description: Collector model.
|
||||
required:
|
||||
- client_id
|
||||
- fields
|
||||
- minimum_cleaner_version
|
||||
- minimum_text_version
|
||||
- latest_version
|
||||
- active_version
|
||||
|
||||
CollectorFields:
|
||||
type: array
|
||||
maxItems: 256
|
||||
description: The fields in the collector.
|
||||
items:
|
||||
$ref: "#/components/schemas/CollectorField"
|
||||
|
||||
CollectorSet:
|
||||
type: object
|
||||
properties:
|
||||
@@ -2630,8 +2339,6 @@ components:
|
||||
$ref: "#/components/schemas/CodeVersion"
|
||||
active_version:
|
||||
$ref: "#/components/schemas/Version"
|
||||
fields:
|
||||
$ref: "#/components/schemas/CollectorFields"
|
||||
description: Payload for updating a Collector.
|
||||
|
||||
CollectorFieldName:
|
||||
@@ -2640,18 +2347,6 @@ components:
|
||||
maxLength: 256
|
||||
description: The output field name.
|
||||
|
||||
CollectorField:
|
||||
type: object
|
||||
description: The field properties for the collector.
|
||||
properties:
|
||||
name:
|
||||
$ref: "#/components/schemas/CollectorFieldName"
|
||||
query_id:
|
||||
$ref: "#/components/schemas/QueryID"
|
||||
required:
|
||||
- name
|
||||
- query_id
|
||||
|
||||
ExportTrigger:
|
||||
type: object
|
||||
properties:
|
||||
|
||||
Reference in New Issue
Block a user