Créer un point d'api de suggestion des usagers pour un ticket

This commit is contained in:
2025-07-01 12:38:02 +00:00
parent 0566ab0910
commit 4f93150874
27 changed files with 1485 additions and 26 deletions

View File

@@ -164,8 +164,8 @@ paths:
type: array
items:
oneOf:
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
responses:
@@ -197,8 +197,8 @@ paths:
properties:
addressee:
oneOf:
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
- $ref: '#/components/schemas/UserGroupById'
- $ref: '#/components/schemas/UserById'
responses:
@@ -288,3 +288,82 @@ paths:
description: "OK"
401:
description: "UNAUTHORIZED"
/1.0/ticket/ticket/{id}/set-caller:
post:
tags:
- ticket
summary: Set a caller for this ticket
description: |
Set a caller to the ticket.
To remove the caller, set the caller field to null
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:
caller:
nullable: true
oneOf:
- $ref: '#/components/schemas/PersonById'
- $ref: '#/components/schemas/ThirdPartyById'
examples:
add_user:
value:
caller:
type: person
id: 8
summary: Set the person with id 8
add_third_party:
value:
caller:
type: thirdparty
id: 10
summary: Set the third party with id 10
remove:
value:
caller: null
summary: Remove the caller (set the caller to null)
responses:
200:
description: "OK"
401:
description: "UNAUTHORIZED"
/1.0/ticket/ticket/{id}/suggest-person:
get:
tags:
- ticket
summary: Get a list of person suggested for the given ticket
parameters:
- name: id
in: path
required: true
description: The ticket id
schema:
type: integer
format: integer
minimum: 1
responses:
401:
description: "UNAUTHORIZED"
200:
description: "OK"
content:
application/json:
schema:
type: array
items:
$ref: '#/components/schemas/Person'