diff --git a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php index a25bee94a..d0aada689 100644 --- a/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php +++ b/src/Bundle/ChillMainBundle/DependencyInjection/ChillMainExtension.php @@ -398,6 +398,26 @@ class ChillMainExtension extends Extension implements PrependExtensionInterface, ], ] ], + [ + 'class' => \Chill\MainBundle\Entity\Scope::class, + 'name' => 'scope', + 'base_path' => '/api/1.0/main/scope', + 'base_role' => 'ROLE_USER', + 'actions' => [ + '_index' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true + ], + ], + '_entity' => [ + 'methods' => [ + Request::METHOD_GET => true, + Request::METHOD_HEAD => true, + ] + ], + ] + ], ] ]); } diff --git a/src/Bundle/ChillMainBundle/chill.api.specs.yaml b/src/Bundle/ChillMainBundle/chill.api.specs.yaml index 3dd8c8736..f6945e20b 100644 --- a/src/Bundle/ChillMainBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillMainBundle/chill.api.specs.yaml @@ -480,3 +480,14 @@ paths: description: "not found" 401: description: "Unauthorized" + + /1.0/main/scope.json: + get: + tags: + - scope + summary: return a list of scopes + responses: + 200: + description: "ok" + 401: + description: "Unauthorized"