diff --git a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php index b0c6a1262..211765330 100644 --- a/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php +++ b/src/Bundle/ChillPersonBundle/DependencyInjection/ChillPersonExtension.php @@ -880,11 +880,13 @@ class ChillPersonExtension extends Extension implements PrependExtensionInterfac '_entity' => [ 'methods' => [ Request::METHOD_POST => true, - Request::METHOD_PATCH => true + Request::METHOD_PATCH => true, + Request::METHOD_DELETE => true, ], 'roles' => [ Request::METHOD_POST => 'ROLE_USER', - Request::METHOD_PATCH => 'ROLE_USER' + Request::METHOD_PATCH => 'ROLE_USER', + Request::METHOD_DELETE => 'ROLE_USER', ] ], 'relationship-by-person' => [ diff --git a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml index 4755566a7..e4a44fdc0 100644 --- a/src/Bundle/ChillPersonBundle/chill.api.specs.yaml +++ b/src/Bundle/ChillPersonBundle/chill.api.specs.yaml @@ -1702,6 +1702,28 @@ paths: description: "OK" 422: description: "Object with validation errors" + delete: + tags: + - relationships + summary: "Remove the relationship" + parameters: + - name: id + in: path + required: true + description: The relationship's id + schema: + type: integer + format: integer + minimum: 1 + responses: + 401: + description: "Unauthorized" + 404: + description: "Not found" + 200: + description: "OK" + 422: + description: "object with validation errors" /1.0/relations/relation.json: