Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
c428cb1
ContentLoadByIdController: Rm Accept header parameter
adriendupuis Aug 5, 2025
c23b5cf
ContentTypeLinkToGroupController.php: Describe `group` GET param
adriendupuis Sep 9, 2025
b6b7fc6
ContentLoadByIdController: Rm Accept header parameter
adriendupuis Aug 5, 2025
5ab7594
ContentTypeLinkToGroupController.php: Describe `group` GET param
adriendupuis Sep 9, 2025
c50b6cf
Merge remote-tracking branch 'origin/enh-openapi' into enh-openapi
adriendupuis Feb 18, 2026
cc4317c
Fix user session
adriendupuis Feb 18, 2026
d131ed2
JWT: The XML input and output aren't supported since #101
adriendupuis Mar 25, 2026
94a3c25
ContentLoadByIdController: Rm Accept header parameter
adriendupuis Aug 5, 2025
c53c70d
ContentTypeLinkToGroupController.php: Describe `group` GET param
adriendupuis Sep 9, 2025
ab98fd2
Fix user session
adriendupuis Feb 18, 2026
22843ab
JWT: The XML input and output aren't supported since #101
adriendupuis Mar 25, 2026
f1d7b0e
Merge remote-tracking branch 'origin/enh-openapi' into enh-openapi
adriendupuis Mar 26, 2026
4ebf91d
Fix REST ApiPlatform/OpenApi doc
adriendupuis Apr 22, 2026
bf62b00
JWT: add response description
adriendupuis Apr 22, 2026
b776a58
Sort mime types
adriendupuis Apr 22, 2026
1b9afe8
JWT: Update requestBody description
adriendupuis Apr 22, 2026
9ee5a1f
ContentCreateController: Add X-CSRF-Token and ContentInfo+json
adriendupuis Apr 29, 2026
1cea8ae
ContentMetadataUpdateController: Add CSRF, use existing examples
adriendupuis Apr 29, 2026
790a2e0
Add CSRF token to all unsafe methods
adriendupuis Apr 29, 2026
f1d4b37
rm SessionController.php empty file
adriendupuis Apr 30, 2026
4155f75
rm RestAuthenticator.php empty file
adriendupuis Apr 30, 2026
f4876d2
rm AuthorizationHeaderRESTRequestMatcher.php empty file
adriendupuis Apr 30, 2026
5c1b76c
Fix x-ibexa-example-file
adriendupuis Apr 30, 2026
62a06d6
Fix x-ibexa-example-file
adriendupuis May 4, 2026
1adcc6e
Fix x-ibexa-example-file
adriendupuis May 4, 2026
219db0b
Fix x-ibexa-example-file
adriendupuis May 4, 2026
17b4d02
Views.php: Use existing example
adriendupuis May 5, 2026
cd818f0
Merge branch '5.0' into enh-openapi
adriendupuis May 6, 2026
676c67b
roles_schemas.yml: Fix required
adriendupuis May 7, 2026
7731cf0
BookmarkIsBookmarkedController: Better param & response descriptions
adriendupuis May 11, 2026
f1314bf
Add operationId
adriendupuis May 11, 2026
8f7b2a0
BookmarkIsBookmarkedController w/ GET
adriendupuis May 11, 2026
9863520
BookmarkCreatedController: requestBody before responses
adriendupuis May 11, 2026
3adaf49
Controller: requestBody before responses
adriendupuis May 11, 2026
32b9e74
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
365e119
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
a4706f0
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
cec7c02
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
379ef49
OpenApiFactory: Don't override response description
adriendupuis May 18, 2026
ac551cc
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
2a965de
Fix/Enh. OpenAPI
adriendupuis May 12, 2026
506836f
BookmarkIsBookmarkedController: fix `use …\Get;` FQCN
adriendupuis Jun 18, 2026
2c01c30
Merge branch 'enh-openapi-ContentType' into enh-openapi-for-review
adriendupuis Jun 18, 2026
794db5e
Merge branch 'enh-openapi-Content' into enh-openapi-for-review
adriendupuis Jun 18, 2026
033f319
Merge branch 'enh-openapi-Location-ObjectState' into enh-openapi-for-…
adriendupuis Jun 18, 2026
e73dd1b
Merge branch 'enh-openapi-User-Session' into enh-openapi-for-review
adriendupuis Jun 18, 2026
53958de
Merge branch 'enh-openapi-Role' into enh-openapi-for-review
adriendupuis Jun 18, 2026
1ce3a64
Merge branch 'enh-openapi-misc' into enh-openapi-for-review
adriendupuis Jun 18, 2026
24a44a3
Merge branch 'fix-response-descriptions' into enh-openapi-for-review
adriendupuis Jun 18, 2026
960806b
Merge branch '5.0' into enh-openapi
adriendupuis Jun 18, 2026
dd533e0
Merge branch 'enh-openapi-for-review' into enh-openapi
adriendupuis Jun 18, 2026
069eea9
BookmarkIsBookmarkedController: fix `use …\Get;` FQCN (again after me…
adriendupuis Jun 18, 2026
6ef82bf
Merge branch '5.0' into enh-openapi
adriendupuis Jul 9, 2026
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
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
{
"UserGroupRefList": {
"_media-type": "application/vnd.ibexa.api.UserGroupRefList+json",
"_href": "/api/ibexa/v2/user/users/57/groups",
"UserGroup": [
{
"_media-type": "application/vnd.ibexa.api.UserGroup+json",
"_href": "/api/ibexa/v2/user/groups/1/5/13"
}
]
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<UserGroupRefList media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/115/groups">
<UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/12">
<unassign href="/api/ibexa/v2/user/users/79/groups/12" method="DELETE"/>
</UserGroup>
<UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13">
<unassign href="/api/ibexa/v2/user/users/115/groups/13" method="DELETE"/>
</UserGroup>
</UserGroupRefList>
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ schemas:
description: A read-only list of IDs or identifiers for which the limitation should be applied. The value of this property must conform to a hash, which means that it may only consist of array and scalar values, but must not contain objects or resources.
type: object
required:
- $ref
- ref
properties:
ref:
type: array
Expand Down
Empty file.
1 change: 1 addition & 0 deletions src/lib/Server/Controller/JWT.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
uriTemplate: '/user/token/jwt',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.create_token',
summary: 'Create JWT token',
description: 'Creates JWT authentication token.',
tags: [
Expand Down
24 changes: 8 additions & 16 deletions src/lib/Server/Controller/Session/SessionCheckController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#[Get(
uriTemplate: '/user/sessions/current',
openapi: new Model\Operation(
operationId: 'ibexa.rest.check_session',
summary: 'Get current session',
description: 'Get current user session, if any.',
tags: [
Expand All @@ -26,38 +27,29 @@
new Model\Parameter(
name: 'Cookie',
in: 'header',
required: true,
required: false,
description: 'Only needed for session\'s checking {sessionName}={sessionID}.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the session is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
],
responses: [
Response::HTTP_OK => [
'description' => 'User is currently logged in and has a valid session.',
'content' => [
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
],
'application/vnd.ibexa.api.Session+json' => [
'schema' => [
'$ref' => '#/components/schemas/SessionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example',
],
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
],
],
],
Response::HTTP_NOT_FOUND => [
Expand Down
62 changes: 23 additions & 39 deletions src/lib/Server/Controller/Session/SessionCreateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,34 +24,17 @@
uriTemplate: '/user/sessions',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.create_session',
summary: 'Create session (login a User)',
description: 'Performs a login for the user or checks if session exists and returns the session and session cookie. The client will need to remember both session name/ID and CSRF token as this is for security reasons not exposed via GET.',
tags: [
'User Session',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the session is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The SessionInput schema encoded in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Cookie',
in: 'header',
required: true,
required: false,
description: 'Only needed for session\'s checking {sessionName}={sessionID}.',
schema: [
'type' => 'string',
Expand All @@ -60,61 +43,62 @@
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'Only needed for session\'s checking. The {csrfToken} needed on all unsafe HTTP methods with session.',
required: false,
description: 'Only needed for session\'s checking. The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
],
requestBody: new Model\RequestBody(
description: 'The session input in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.SessionInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/SessionInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example',
],
'application/vnd.ibexa.api.SessionInput+json' => [
'schema' => [
'$ref' => '#/components/schemas/SessionInputWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example',
],
'application/vnd.ibexa.api.SessionInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/SessionInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example',
],
]),
),
responses: [
Response::HTTP_OK => [
'description' => 'Session already exists.',
'content' => [
'application/vnd.ibexa.api.Session+xml' => [
'application/vnd.ibexa.api.Session+json' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
'$ref' => '#/components/schemas/SessionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example',
],
'application/vnd.ibexa.api.Session+json' => [
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/SessionWrapper',
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
],
],
],
Response::HTTP_CREATED => [
'description' => 'Session is created.',
'content' => [
'application/vnd.ibexa.api.Session+xml' => [
'application/vnd.ibexa.api.Session+json' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
'$ref' => '#/components/schemas/SessionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example',
],
'application/vnd.ibexa.api.Session+json' => [
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/SessionWrapper',
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
],
],
],
Expand Down
5 changes: 3 additions & 2 deletions src/lib/Server/Controller/Session/SessionDeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
#[Delete(
uriTemplate: '/user/sessions/{sessionId}',
openapi: new Model\Operation(
operationId: 'ibexa.rest.delete_session',
summary: 'Delete session (logout a User)',
description: 'The user session is removed i.e. the user is logged out.',
tags: [
Expand All @@ -35,8 +36,8 @@
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The {csrfToken} needed on all unsafe HTTP methods with session.',
required: false,
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand Down
33 changes: 14 additions & 19 deletions src/lib/Server/Controller/Session/SessionRefreshController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
uriTemplate: '/user/sessions/{sessionId}/refresh',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.refresh_session',
summary: 'Refresh session (deprecated)',
description: 'Get the session\'s User information. Deprecated as of Ibexa DXP 4.6, use GET /user/sessions/current instead.',
tags: [
Expand All @@ -37,16 +38,8 @@
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The {csrfToken} needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
required: false,
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -60,30 +53,32 @@
],
),
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
responses: [
Response::HTTP_OK => [
'description' => 'OK - returns the Session in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example',
],
'application/vnd.ibexa.api.Session+json' => [
'schema' => [
'$ref' => '#/components/schemas/SessionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example',
],
'application/vnd.ibexa.api.Session+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Session',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.xml.example',
],
],
],
Response::HTTP_NOT_FOUND => [
'description' => 'Error - the session does not exist.',
],
],
requestBody: new Model\RequestBody(
content: new \ArrayObject(),
),
),
)]
/**
Expand Down
Empty file.
25 changes: 14 additions & 11 deletions src/lib/Server/Controller/User/UserAssignToUserGroupController.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,17 +22,18 @@
uriTemplate: '/user/users/{userId}/groups',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.assign_user_to_user_group',
summary: 'Assign User Group',
description: 'Assigns the User to a User Group.',
tags: [
'User',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the link list of User Groups is returned in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -46,20 +47,25 @@
],
),
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
responses: [
Response::HTTP_OK => [
'description' => 'If set, the link list of User Groups is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.UserGroupRefList+xml' => [
'application/vnd.ibexa.api.UserGroupRefList+json' => [
'schema' => [
'$ref' => '#/components/schemas/UserGroupRefList',
'$ref' => '#/components/schemas/UserGroupRefListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.json.example',
],
'application/vnd.ibexa.api.UserGroupRefList+json' => [
'application/vnd.ibexa.api.UserGroupRefList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/UserGroupRefListWrapper',
'$ref' => '#/components/schemas/UserGroupRefList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example',
],
],
],
Expand All @@ -73,9 +79,6 @@
'description' => 'Error - the User does not exist.',
],
],
requestBody: new Model\RequestBody(
content: new \ArrayObject(),
),
),
)]
final class UserAssignToUserGroupController extends UserBaseController
Expand Down
Loading
Loading