mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 07:03:49 +00:00
add route for comment + track update/creation of entities
This commit is contained in:
@@ -92,6 +92,31 @@ components:
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
Comment:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- 'accompanying_period_comment'
|
||||
readOnly: true
|
||||
id:
|
||||
type: integer
|
||||
readOnly: true
|
||||
content:
|
||||
type: string
|
||||
CommentById:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- 'accompanying_period_comment'
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
|
||||
paths:
|
||||
/1.0/person/accompanying-course/{id}.json:
|
||||
@@ -345,3 +370,72 @@ paths:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "object with validation errors"
|
||||
|
||||
/1.0/person/accompanying-course/{id}/comment.json:
|
||||
post:
|
||||
tags:
|
||||
- person
|
||||
summary: "Add a comment 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/Comment'
|
||||
examples:
|
||||
a single comment:
|
||||
summary: "a simple comment"
|
||||
value:
|
||||
type: accompanying_period_comment
|
||||
content: |
|
||||
This is a funny comment I would like to share with you.
|
||||
|
||||
Thank you for reading this !
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "object with validation errors"
|
||||
delete:
|
||||
tags:
|
||||
- person
|
||||
summary: "Remove the resource"
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The accompanying period's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
requestBody:
|
||||
description: "A resource"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: '#/components/schemas/CommentById'
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
422:
|
||||
description: "object with validation errors"
|
||||
|
Reference in New Issue
Block a user