Implement functionality to replace ticket's motive

The commit introduces several features related to ticket motive management in the Chill-TicketBundle:
- Adds capability to replace a ticket's motive with a new one.
- Provides ticket motive history management features.
- Implements relevant changes in Controller, Action Handler, and Entity levels.
- Incorporates new API endpoints and updates the API specification file for the new feature.
- Includes tests to ensure the new functionality works as expected.
This commit is contained in:
2024-04-17 21:41:30 +02:00
parent a9760b323f
commit 670b8eb82b
8 changed files with 467 additions and 0 deletions

View File

@@ -13,6 +13,18 @@ components:
fr: Retard de livraison
active:
type: boolean
MotiveById:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- ticket_motive
required:
- id
- type
paths:
/1.0/ticket/motive.json:
@@ -23,3 +35,32 @@ paths:
responses:
200:
description: "OK"
/1.0/ticket/{id}/motive/set:
post:
tags:
- ticket
summary: Replace the existing ticket's motive by a new one
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:
motive:
$ref: "#/components/schemas/MotiveById"
responses:
201:
description: "ACCEPTED"
422:
description: "UNPROCESSABLE ENTITY"