mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
documentation for api
This commit is contained in:
91
src/Bundle/ChillPersonBundle/chill.api.specs.yaml
Normal file
91
src/Bundle/ChillPersonBundle/chill.api.specs.yaml
Normal file
@@ -0,0 +1,91 @@
|
||||
components:
|
||||
schemas:
|
||||
PersonById:
|
||||
type: object
|
||||
properties:
|
||||
person_id:
|
||||
type: integer
|
||||
required:
|
||||
- person_id
|
||||
ThirdPartyById:
|
||||
type: object
|
||||
properties:
|
||||
thirdparty_id:
|
||||
type: integer
|
||||
required:
|
||||
- thirdparty_id
|
||||
|
||||
|
||||
paths:
|
||||
/1.0/person/accompanying-course/{id}.json:
|
||||
get:
|
||||
tags:
|
||||
- person
|
||||
summary: "Return the description for an accompanying course (accompanying period)"
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The accompanying period's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
/1.0/person/accompanying-course/{id}/requestor.json:
|
||||
post:
|
||||
tags:
|
||||
- person
|
||||
summary: "Add a requestor 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 or thirdparty"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
oneOf:
|
||||
- $ref: '#/components/schemas/PersonById'
|
||||
- $ref: '#/components/schemas/ThirdPartyById'
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
delete:
|
||||
tags:
|
||||
- person
|
||||
summary: "Remove the requestor for the accompanying course"
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The accompanying period's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
|
Reference in New Issue
Block a user