mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-06-07 18:44:08 +00:00
Merge branch '139_demandeur' of gitlab.com:Chill-Projet/chill-bundles into 139_demandeur
This commit is contained in:
commit
0af78f814c
@ -3,23 +3,34 @@ components:
|
|||||||
PersonById:
|
PersonById:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
person_id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- 'person'
|
||||||
required:
|
required:
|
||||||
- person_id
|
- id
|
||||||
|
- type
|
||||||
ThirdPartyById:
|
ThirdPartyById:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
thirdparty_id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
|
type:
|
||||||
|
type: string
|
||||||
|
enum:
|
||||||
|
- 'thirdparty'
|
||||||
required:
|
required:
|
||||||
- thirdparty_id
|
- id
|
||||||
|
- type
|
||||||
AccompanyingPeriod:
|
AccompanyingPeriod:
|
||||||
type: object
|
type: object
|
||||||
properties:
|
properties:
|
||||||
type:
|
type:
|
||||||
type: string
|
type: string
|
||||||
x-fixed-value: 'accompanying_period'
|
enum:
|
||||||
|
- accompanying_period
|
||||||
id:
|
id:
|
||||||
type: integer
|
type: integer
|
||||||
requestorAnonymous:
|
requestorAnonymous:
|
||||||
@ -75,6 +86,8 @@ paths:
|
|||||||
description: "Not found"
|
description: "Not found"
|
||||||
200:
|
200:
|
||||||
description: "OK"
|
description: "OK"
|
||||||
|
422:
|
||||||
|
description: "object with validation errors"
|
||||||
/1.0/person/accompanying-course/{id}/requestor.json:
|
/1.0/person/accompanying-course/{id}/requestor.json:
|
||||||
post:
|
post:
|
||||||
tags:
|
tags:
|
||||||
@ -98,6 +111,17 @@ paths:
|
|||||||
oneOf:
|
oneOf:
|
||||||
- $ref: '#/components/schemas/PersonById'
|
- $ref: '#/components/schemas/PersonById'
|
||||||
- $ref: '#/components/schemas/ThirdPartyById'
|
- $ref: '#/components/schemas/ThirdPartyById'
|
||||||
|
examples:
|
||||||
|
add person with id 50:
|
||||||
|
summary: "a person with id 50"
|
||||||
|
value:
|
||||||
|
type: person
|
||||||
|
id: 50
|
||||||
|
add thirdparty with id 100:
|
||||||
|
summary: "a third party with id 100"
|
||||||
|
value:
|
||||||
|
type: thirdparty
|
||||||
|
id: 100
|
||||||
responses:
|
responses:
|
||||||
401:
|
401:
|
||||||
description: "Unauthorized"
|
description: "Unauthorized"
|
||||||
@ -105,6 +129,8 @@ paths:
|
|||||||
description: "Not found"
|
description: "Not found"
|
||||||
200:
|
200:
|
||||||
description: "OK"
|
description: "OK"
|
||||||
|
422:
|
||||||
|
description: "object with validation errors"
|
||||||
delete:
|
delete:
|
||||||
tags:
|
tags:
|
||||||
- person
|
- person
|
||||||
@ -125,4 +151,65 @@ paths:
|
|||||||
description: "Not found"
|
description: "Not found"
|
||||||
200:
|
200:
|
||||||
description: "OK"
|
description: "OK"
|
||||||
|
422:
|
||||||
|
description: "object with validation errors"
|
||||||
|
|
||||||
|
/1.0/person/accompanying-course/{id}/participation.json:
|
||||||
|
post:
|
||||||
|
tags:
|
||||||
|
- person
|
||||||
|
summary: "Add a participant to the accompanying course"
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The accompanying period's id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
requestBody:
|
||||||
|
description: "A person"
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PersonById'
|
||||||
|
responses:
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
404:
|
||||||
|
description: "Not found"
|
||||||
|
200:
|
||||||
|
description: "OK"
|
||||||
|
422:
|
||||||
|
description: "object with validation errors"
|
||||||
|
delete:
|
||||||
|
tags:
|
||||||
|
- person
|
||||||
|
summary: "Remove the participant for the accompanying course"
|
||||||
|
parameters:
|
||||||
|
- name: id
|
||||||
|
in: path
|
||||||
|
required: true
|
||||||
|
description: The accompanying period's id
|
||||||
|
schema:
|
||||||
|
type: integer
|
||||||
|
format: integer
|
||||||
|
minimum: 1
|
||||||
|
requestBody:
|
||||||
|
description: "A person"
|
||||||
|
required: true
|
||||||
|
content:
|
||||||
|
application/json:
|
||||||
|
schema:
|
||||||
|
$ref: '#/components/schemas/PersonById'
|
||||||
|
responses:
|
||||||
|
401:
|
||||||
|
description: "Unauthorized"
|
||||||
|
404:
|
||||||
|
description: "Not found"
|
||||||
|
200:
|
||||||
|
description: "OK"
|
||||||
|
422:
|
||||||
|
description: "object with validation errors"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user