mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-29 01:55:01 +00:00
Tickets: edit comments and mark them as deleted
This commit is contained in:
@@ -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:
|
||||
|
Reference in New Issue
Block a user