mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-30 19:43:49 +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:
@@ -15,7 +15,9 @@ use Chill\MainBundle\Controller\AddressApiController;
|
||||
use Chill\MainBundle\Controller\CenterController;
|
||||
use Chill\MainBundle\Controller\CivilityApiController;
|
||||
use Chill\MainBundle\Controller\CivilityController;
|
||||
use Chill\MainBundle\Controller\CountryApiController;
|
||||
use Chill\MainBundle\Controller\CountryController;
|
||||
use Chill\MainBundle\Controller\GeographicalUnitApiController;
|
||||
use Chill\MainBundle\Controller\LanguageController;
|
||||
use Chill\MainBundle\Controller\LocationController;
|
||||
use Chill\MainBundle\Controller\LocationTypeController;
|
||||
@@ -667,6 +669,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
[
|
||||
'class' => Country::class,
|
||||
'controller' => CountryApiController::class,
|
||||
'name' => 'country',
|
||||
'base_path' => '/api/1.0/main/country',
|
||||
'base_role' => 'ROLE_USER',
|
||||
@@ -787,6 +790,7 @@ class ChillMainExtension extends Extension implements
|
||||
],
|
||||
[
|
||||
'class' => GeographicalUnitLayer::class,
|
||||
'controller' => GeographicalUnitApiController::class,
|
||||
'name' => 'geographical-unit-layer',
|
||||
'base_path' => '/api/1.0/main/geographical-unit-layer',
|
||||
'base_role' => 'ROLE_USER',
|
||||
|
Reference in New Issue
Block a user