Add functionality to add single addressee to tickets

This update introduces a new feature allowing end-users to add a single addressee to a ticket without removing the existing ones. This was achieved by adding a new API endpoint and updating the SetAddresseesController to handle the addition of a single addressee. Accompanying tests have also been provided to ensure the new feature works as expected.
This commit is contained in:
2024-04-23 23:00:12 +02:00
parent b434d38091
commit fa67835690
5 changed files with 157 additions and 5 deletions

View File

@@ -115,7 +115,7 @@ paths:
schema:
type: object
properties:
addresses:
addressees:
type: array
items:
oneOf:
@@ -129,3 +129,35 @@ paths:
422:
description: "UNPROCESSABLE ENTITY"
/1.0/ticket/{id}/addressee/add:
post:
tags:
- ticket
summary: Add an addressee to a ticket, without removing existing ones.
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
addressee:
oneOf:
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
responses:
201:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"