mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-21 15:13:50 +00:00
relation and relationship entities created + endpoints. Still something wrong with link between Relation and Relationship
This commit is contained in:
@@ -274,6 +274,41 @@ components:
|
||||
enum:
|
||||
- "social_work_goal"
|
||||
|
||||
RelationById:
|
||||
type: object
|
||||
properties:
|
||||
id:
|
||||
type: integer
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- "relation"
|
||||
required:
|
||||
- id
|
||||
- type
|
||||
Relationship:
|
||||
type: object
|
||||
properties:
|
||||
type:
|
||||
type: string
|
||||
enum:
|
||||
- "relationship"
|
||||
id:
|
||||
type: integer
|
||||
readOnly: true
|
||||
fromPerson:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/PersonById"
|
||||
toPerson:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/PersonById"
|
||||
relation:
|
||||
anyOf:
|
||||
- $ref: "#/components/schemas/RelationById"
|
||||
reverse:
|
||||
type: boolean
|
||||
|
||||
|
||||
paths:
|
||||
/1.0/person/person/{id}.json:
|
||||
get:
|
||||
@@ -1589,3 +1624,50 @@ paths:
|
||||
description: "OK"
|
||||
400:
|
||||
description: "Bad Request"
|
||||
|
||||
/1.0/relations/relationship/by-person/{id}.json:
|
||||
get:
|
||||
tags:
|
||||
- relationships
|
||||
parameters:
|
||||
- name: id
|
||||
in: path
|
||||
required: true
|
||||
description: The person's id
|
||||
schema:
|
||||
type: integer
|
||||
format: integer
|
||||
minimum: 1
|
||||
responses:
|
||||
401:
|
||||
description: "Unauthorized"
|
||||
404:
|
||||
description: "Not found"
|
||||
200:
|
||||
description: "OK"
|
||||
400:
|
||||
description: "Bad Request"
|
||||
|
||||
/1.0/relations/relationship.json:
|
||||
post:
|
||||
tags:
|
||||
- relationships
|
||||
summary: Create a new relationship
|
||||
requestBody:
|
||||
description: "A relationship"
|
||||
required: true
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Relationship"
|
||||
responses:
|
||||
200:
|
||||
description: "OK"
|
||||
content:
|
||||
application/json:
|
||||
schema:
|
||||
$ref: "#/components/schemas/Relationship"
|
||||
403:
|
||||
description: "Unauthorized"
|
||||
422:
|
||||
description: "Invalid data: the data is a valid json, could be deserialized, but does not pass validation"
|
||||
|
Reference in New Issue
Block a user