From f7dec262920ace71aa2bb15ccf52a471f5f4775b Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 5 Aug 2025 10:17:31 +0200 Subject: [PATCH 1/2] ContentLoadByIdController: Rm Accept header parameter --- .../Content/ContentLoadByIdController.php | 24 ++++--------------- 1 file changed, 4 insertions(+), 20 deletions(-) diff --git a/src/lib/Server/Controller/Content/ContentLoadByIdController.php b/src/lib/Server/Controller/Content/ContentLoadByIdController.php index 031609f9..9da64534 100644 --- a/src/lib/Server/Controller/Content/ContentLoadByIdController.php +++ b/src/lib/Server/Controller/Content/ContentLoadByIdController.php @@ -20,29 +20,13 @@ uriTemplate: '/content/objects/{contentId}', openapi: new Model\Operation( summary: 'Load content', - description: 'Loads the content item for the given ID. Depending on the Accept header the current version is embedded (i.e. the current published version or if it does not exist, the draft of the authenticated user).', + description: 'Loads the content item for the given ID. Depending on the Accept header the current version is embedded (i.e. the current published version or if it does not exist, the draft of the authenticated user). +* Content - If set, all information for the content item including the embedded current version is returned in XML or JSON format. +* ContentInfo - If set, all information for the content item (excluding the current version) is returned in XML or JSON format.', tags: [ 'Objects', ], parameters: [ - new Model\Parameter( - name: 'Accept', - in: 'header', - required: true, - description: ' -* Content - If set, all information for the content item including the embedded current version is returned in XML or JSON format. -* ContentInfo - If set, all information for the content item (excluding the current version) is returned in XML or JSON format. - ', - schema: [ - 'type' => 'string', - 'enum' => [ - 'application/vnd.ibexa.api.Content+xml', - 'application/vnd.ibexa.api.Content+json', - 'application/vnd.ibexa.api.ContentInfo+xml', - 'application/vnd.ibexa.api.ContentInfo+json', - ], - ], - ), new Model\Parameter( name: 'If-None-Match', in: 'header', @@ -80,12 +64,12 @@ 'schema' => [ '$ref' => '#/components/schemas/ContentInfo', ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', ], 'application/vnd.ibexa.api.ContentInfo+json' => [ 'schema' => [ '$ref' => '#/components/schemas/ContentInfoWrapper', ], - 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', ], ], ], From 3783933bbe56a32aa69db6e3b9e6a19dde88dcb5 Mon Sep 17 00:00:00 2001 From: Adrien Dupuis <61695653+adriendupuis@users.noreply.github.com> Date: Tue, 9 Sep 2025 17:29:37 +0200 Subject: [PATCH 2/2] ContentTypeLinkToGroupController.php: Describe `group` GET param --- .../ContentType/ContentTypeLinkToGroupController.php | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/src/lib/Server/Controller/ContentType/ContentTypeLinkToGroupController.php b/src/lib/Server/Controller/ContentType/ContentTypeLinkToGroupController.php index 9342f30a..db90a932 100644 --- a/src/lib/Server/Controller/ContentType/ContentTypeLinkToGroupController.php +++ b/src/lib/Server/Controller/ContentType/ContentTypeLinkToGroupController.php @@ -46,6 +46,15 @@ 'type' => 'string', ], ), + new Model\Parameter( + name: 'group', + in: 'query', + required: true, + schema: [ + 'type' => 'string', + ], + description: 'Destination content type group URI; for example with content type group 4: `?group=/api/ibexa/v2/content/typegroups/4`', + ), ], responses: [ Response::HTTP_OK => [