mirror of
https://gitlab.com/Chill-Projet/chill-bundles.git
synced 2025-08-25 00:53:48 +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:
@@ -11,6 +11,7 @@ declare(strict_types=1);
|
||||
|
||||
namespace Chill\DocStoreBundle\DependencyInjection;
|
||||
|
||||
use Chill\DocStoreBundle\Controller\StoredObjectApiController;
|
||||
use Chill\DocStoreBundle\Security\Authorization\AccompanyingCourseDocumentVoter;
|
||||
use Chill\DocStoreBundle\Security\Authorization\PersonDocumentVoter;
|
||||
use Symfony\Component\Config\FileLocator;
|
||||
@@ -57,6 +58,7 @@ class ChillDocStoreExtension extends Extension implements PrependExtensionInterf
|
||||
'apis' => [
|
||||
[
|
||||
'class' => \Chill\DocStoreBundle\Entity\StoredObject::class,
|
||||
'controller' => StoredObjectApiController::class,
|
||||
'name' => 'stored_object',
|
||||
'base_path' => '/api/1.0/docstore/stored-object',
|
||||
'base_role' => 'ROLE_USER',
|
||||
|
Reference in New Issue
Block a user