Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 17 additions & 23 deletions src/lib/Server/Controller/Role/RoleAssignToUserController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,18 @@
uriTemplate: '/user/users/{userId}/roles',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.assign_role_to_user',
summary: 'Assign Role to User',
description: 'Assigns a Role to a user.',
tags: [
'User',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the updated Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The RoleAssignInput schema encoded in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -55,35 +47,37 @@
),
],
requestBody: new Model\RequestBody(
description: 'The RoleAssignInput schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.RoleAssignInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example',
],
'application/vnd.ibexa.api.RoleAssignInput+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignInputWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example',
],
'application/vnd.ibexa.api.RoleAssignInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example',
],
]),
),
responses: [
Response::HTTP_OK => [
'description' => 'If set, the updated Role assignment list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentList',
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.json.example',
],
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
'$ref' => '#/components/schemas/RoleAssignmentList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example',
],
],
],
Expand Down
40 changes: 17 additions & 23 deletions src/lib/Server/Controller/Role/RoleAssignToUserGroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,18 @@
uriTemplate: '/user/groups/{path}/roles',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.assign_role_to_user_group',
summary: 'Assign Role to User Group',
description: 'Assigns a Role to a User Group.',
tags: [
'User Group',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the updated Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The RoleAssignInput schema encoded in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -55,35 +47,37 @@
),
],
requestBody: new Model\RequestBody(
description: 'The RoleAssignInput schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.RoleAssignInput+xml' => [
'application/vnd.ibexa.api.RoleAssignInput+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignInput',
'$ref' => '#/components/schemas/RoleAssignInputWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.json.example',
],
'application/vnd.ibexa.api.RoleAssignInput+json' => [
'application/vnd.ibexa.api.RoleAssignInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignInputWrapper',
'$ref' => '#/components/schemas/RoleAssignInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example',
],
]),
),
responses: [
Response::HTTP_OK => [
'description' => 'If set, the updated Role assignment list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentList',
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.json.example',
],
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
'$ref' => '#/components/schemas/RoleAssignmentList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@
uriTemplate: '/user/groups/{path}/roles',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.load_role_assignments_for_user_group',
summary: 'Load Roles for User Group',
description: 'Returns a list of all Roles assigned to the given User Group.',
tags: [
'User Group',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'path',
in: 'path',
Expand All @@ -43,18 +35,19 @@
],
responses: [
Response::HTTP_OK => [
'description' => 'If set, the Role assignment list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentList',
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssigmentList.json.example',
],
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
'$ref' => '#/components/schemas/RoleAssignmentList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssignmentList.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,13 @@
uriTemplate: '/user/groups/{path}/roles/{roleId}',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.load_role_assignment_for_user_group',
summary: 'Load User Group Role Assignment',
description: 'Returns a Role assignment of the given User Group.',
tags: [
'User Group',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'path',
in: 'path',
Expand All @@ -55,17 +47,17 @@
Response::HTTP_OK => [
'description' => 'OK - returns a Role assignment of the given User Group.',
'content' => [
'application/vnd.ibexa.api.RoleAssignment+xml' => [
'application/vnd.ibexa.api.RoleAssignment+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignment',
'$ref' => '#/components/schemas/RoleAssignmentWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.json.example',
],
'application/vnd.ibexa.api.RoleAssignment+json' => [
'application/vnd.ibexa.api.RoleAssignment+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentWrapper',
'$ref' => '#/components/schemas/RoleAssignment',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,13 @@
uriTemplate: '/user/users/{userId}/roles',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.load_role_assignments_for_user',
summary: 'Load Roles for User',
description: 'Returns a list of all Roles assigned to the given User.',
tags: [
'User',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'userId',
in: 'path',
Expand All @@ -43,18 +35,19 @@
],
responses: [
Response::HTTP_OK => [
'description' => 'If set, the Role assignment list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentList',
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.json.example',
],
'application/vnd.ibexa.api.RoleAssignmentList+json' => [
'application/vnd.ibexa.api.RoleAssignmentList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentListWrapper',
'$ref' => '#/components/schemas/RoleAssignmentList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,21 +19,13 @@
uriTemplate: '/user/users/{userId}/roles/{roleId}',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.load_role_assignment_for_user',
summary: 'Load User Role Assignment',
description: 'Returns a Role assignment to the given User.',
tags: [
'User',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the Role assignment list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'userId',
in: 'path',
Expand All @@ -55,18 +47,18 @@
Response::HTTP_OK => [
'description' => 'OK - Role assignment to the given User Group.',
'content' => [
'application/vnd.ibexa.api.RoleAssignment+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignment',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example',
],
'application/vnd.ibexa.api.RoleAssignment+json' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignmentWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example',
],
'application/vnd.ibexa.api.RoleAssignment+xml' => [
'schema' => [
'$ref' => '#/components/schemas/RoleAssignment',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example',
],
],
],
Response::HTTP_UNAUTHORIZED => [
Expand Down
Loading
Loading