add route for scope on participation

This commit is contained in:
2021-05-13 17:44:54 +02:00
parent f3eb418409
commit f1d5d9840e
4 changed files with 122 additions and 4 deletions

View File

@@ -1,11 +1,41 @@
components:
schemas:
# should go to main
Date:
type: object
properties:
datetime:
type: string
format: date-time
Scope:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- scope
name:
type: object
additionalProperties:
type: string
example:
fr: Social
ScopeById:
type: object
properties:
id:
type: integer
type:
type: string
enum:
- scope
required:
- id
- scope
# ok to stay here
Person:
type: object
properties:
@@ -413,7 +443,7 @@ paths:
delete:
tags:
- person
summary: "Remove the resource"
summary: "Remove the comment"
parameters:
- name: id
in: path
@@ -424,7 +454,7 @@ paths:
format: integer
minimum: 1
requestBody:
description: "A resource"
description: "A comment"
required: true
content:
application/json:
@@ -439,3 +469,68 @@ paths:
description: "OK"
422:
description: "object with validation errors"
/1.0/person/accompanying-course/{id}/scope.json:
post:
tags:
- person
summary: "Add a scope 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 comment"
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/Scope'
examples:
add a scope:
value:
type: scope
id: 5
responses:
401:
description: "Unauthorized"
404:
description: "Not found"
200:
description: "OK"
422:
description: "object with validation errors"
delete:
tags:
- person
summary: "Remove the scope"
parameters:
- name: id
in: path
required: true
description: The accompanying period's id
schema:
type: integer
format: integer
minimum: 1
requestBody:
description: "A scope with his id"
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/ScopeById'
responses:
401:
description: "Unauthorized"
404:
description: "Not found"
200:
description: "OK"
422:
description: "object with validation errors"