Tickets: edit comments and mark them as deleted

This commit is contained in:
2025-07-11 12:56:19 +00:00
parent 568c8be7fd
commit 3400656d7c
25 changed files with 945 additions and 7 deletions

View File

@@ -1,5 +1,10 @@
components:
schemas:
TicketComment:
type: object
properties:
id:
type: integer
TicketSimple:
type: object
properties:
@@ -162,6 +167,101 @@ paths:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"
/1.0/ticket/comment/{id}/edit:
post:
tags:
- ticket
summary: Edit the comment' content
parameters:
- name: id
in: path
required: true
description: The comment's id
schema:
type: integer
format: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
content:
type: string
responses:
200:
description: "OK"
content:
application/json:
schema:
$ref: '#/components/schemas/TicketComment'
403:
description: "Unauthorized"
/1.0/ticket/comment/{id}/delete:
post:
tags:
- ticket
summary: Soft-delete a comment within a ticket
description: |
This will soft delete a comment within a ticket.
Only the author of the comment is allowed to edit the comment.
If a comment is deleted, it can be restored by using the "restore" call.
The method is idempotent: it will have no effect on an already deleted comment.
parameters:
- name: id
in: path
required: true
description: The comment's id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "OK"
content:
application/json:
schema:
$ref: '#/components/schemas/TicketComment'
403:
description: "Unauthorized"
/1.0/ticket/comment/{id}/restore:
post:
tags:
- ticket
summary: Restore a comment within a ticket
description: |
This will restore a comment of a ticket.
Only the author of the comment is allowed to restore the comment.
If the comment is not deleted, this method has no effect.
parameters:
- name: id
in: path
required: true
description: The comment's id
schema:
type: integer
format: integer
minimum: 1
responses:
200:
description: "OK"
content:
application/json:
schema:
$ref: '#/components/schemas/TicketComment'
403:
description: "Unauthorized"
/1.0/ticket/{id}/persons/set:
post: