Allow to change extracted text of attachments

Closes: #1775
This commit is contained in:
eikek
2022-10-31 22:14:40 +01:00
parent 195b35fb52
commit 643afd1809
5 changed files with 232 additions and 20 deletions

View File

@ -4823,6 +4823,72 @@ paths:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
/sec/attachment/{id}/extracted-text:
get:
operationId: "sec-attachment-get-extracted-text"
tags: [ Attachment ]
summary: Get the extracted text of the given attachment.
description: |
Returns the extracted text of the attachment with the given
id.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
responses:
422:
description: BadRequest
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/OptionalText"
delete:
operationId: "sec-attachment-delete-extracted-text"
summary: Removes extracted text for the given attachment.
description: |
Removes any extracted text for the given attachment.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
responses:
422:
description: BadRequest
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
post:
operationId: "sec-attachment-post-extracted-text"
tags: [ Attachment ]
summary: Changes the extracted text for an attachment
description: |
Changes the extracted text of the attachment with the given
id. The attachment must be part of an item that belongs to the
collective of the current user. This can be used to correct
poor ocr-ed files.
security:
- authTokenHeader: []
parameters:
- $ref: "#/components/parameters/id"
requestBody:
content:
application/json:
schema:
$ref: "#/components/schemas/OptionalText"
responses:
422:
description: BadRequest
200:
description: Ok
content:
application/json:
schema:
$ref: "#/components/schemas/BasicResult"
/sec/attachments/delete:
post: