relation and relationship entities created + endpoints. Still something wrong with link between Relation and Relationship

This commit is contained in:
2021-10-22 19:21:32 +02:00
parent 6ff80be88d
commit 05d16ec9ab
9 changed files with 539 additions and 7 deletions

View File

@@ -587,7 +587,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
'findAccompanyingPeriodsByPerson' => [
'path' => '/by-person/{person_id}.{_format}',
'controller_action' => 'findAccompanyingPeriodsByPerson',
'controller_action' => 'getAccompanyingPeriodsByPerson',
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
@@ -870,6 +870,41 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
],
]
],
[
'class' => \Chill\PersonBundle\Entity\Relationships\Relationship::class,
'controller' => \Chill\PersonBundle\Controller\RelationshipApiController::class,
'name' => 'relationship_by_person',
'base_path' => '/api/1.0/relations/relationship',
'base_role' => 'ROLE_USER',
'actions' => [
'_entity' => [
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
Request::METHOD_POST => true,
Request::METHOD_PATCH => true
],
'roles' => [
Request::METHOD_GET => 'ROLE_USER',
Request::METHOD_HEAD => 'ROLE_USER',
Request::METHOD_POST => 'ROLE_USER',
Request::METHOD_PATCH => 'ROLE_USER'
]
],
'relationship-by-person' => [
'path' => '/by-person/{person_id}.json',
'controller_action' => 'getRelationshipsByPerson',
'methods' => [
Request::METHOD_GET => true,
Request::METHOD_HEAD => true,
],
'roles' => [
Request::METHOD_GET => 'ROLE_USER',
Request::METHOD_HEAD => 'ROLE_USER',
]
],
]
]
]
]);
}