mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-09-05 14:25:00 +00:00
Add explicit controller definition requirement for APIs
Updated API creation to require an explicit controller definition. This change has been reflected in the ChillMainExtension and ChillPersonExtension files. Also, it has introduced a new exception, the InvalidCrudConfiguration, which will be thrown when a new API or CRUD is created without this explicit controller definition.
This commit is contained in:
@@ -13,7 +13,10 @@ namespace Chill\PersonBundle\DependencyInjection;
|
||||
|
||||
use Chill\MainBundle\DependencyInjection\MissingBundleException;
|
||||
use Chill\MainBundle\Security\Authorization\ChillExportVoter;
|
||||
use Chill\PersonBundle\Controller\AccompanyingPeriodCommentApiController;
|
||||
use Chill\PersonBundle\Controller\AccompanyingPeriodResourceApiController;
|
||||
use Chill\PersonBundle\Controller\HouseholdCompositionTypeApiController;
|
||||
use Chill\PersonBundle\Controller\RelationApiController;
|
||||
use Chill\PersonBundle\Doctrine\DQL\AddressPart;
|
||||
use Chill\PersonBundle\Entity\AccompanyingPeriod;
|
||||
use Chill\PersonBundle\Security\Authorization\AccompanyingPeriodCommentVoter;
|
||||
@@ -537,6 +540,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
],
|
||||
[
|
||||
'class' => AccompanyingPeriod\Comment::class,
|
||||
'controller' => AccompanyingPeriodCommentApiController::class,
|
||||
'name' => 'accompanying_period_comment',
|
||||
'base_path' => '/api/1.0/person/accompanying-period/comment',
|
||||
'base_role' => 'ROLE_USER',
|
||||
@@ -556,6 +560,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
],
|
||||
[
|
||||
'class' => AccompanyingPeriod\Resource::class,
|
||||
'controller' => AccompanyingPeriodResourceApiController::class,
|
||||
'name' => 'accompanying_period_resource',
|
||||
'base_path' => '/api/1.0/person/accompanying-period/resource',
|
||||
'base_role' => 'ROLE_USER',
|
||||
@@ -874,6 +879,7 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac
|
||||
],
|
||||
[
|
||||
'class' => \Chill\PersonBundle\Entity\Relationships\Relation::class,
|
||||
'controller' => RelationApiController::class,
|
||||
'name' => 'relations',
|
||||
'base_path' => '/api/1.0/relations/relation',
|
||||
'base_role' => 'ROLE_USER',
|
||||
|
Reference in New Issue
Block a user