Add functionality to set addressees for a ticket

This update includes the implementation of methods to add and retrieve addressee history in the Ticket entity, a handler for addressee setting command, denormalizer for transforming request data to SetAddresseesCommand, and corresponding tests. Additionally, it adds a SetAddresseesController for handling addressee related requests and updates the API specifications.
This commit is contained in:
2024-04-23 17:47:07 +02:00
parent 9f355032a8
commit b434d38091
15 changed files with 677 additions and 3 deletions

View File

@@ -93,3 +93,39 @@ paths:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"
/1.0/ticket/{id}/addressees/set:
post:
tags:
- ticket
summary: Set the addresses for an existing ticket (will replace all the existing addresses)
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:
addresses:
type: array
items:
oneOf:
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
responses:
201:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"