Skip to content
Draft
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
24 changes: 4 additions & 20 deletions src/lib/Server/Controller/Content/ContentLoadByIdController.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -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',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 => [
Expand Down
Loading