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

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
],
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
),
Expand Down
24 changes: 7 additions & 17 deletions src/lib/Server/Controller/Bookmark/BookmarkListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,22 @@
tags: [
'Bookmark',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
],
responses: [
Response::HTTP_OK => [
'description' => 'If set, the list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.BookmarkList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/BookmarkList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example',
],
'application/vnd.ibexa.api.BookmarkList+json' => [
'schema' => [
'$ref' => '#/components/schemas/BookmarkListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example',
],
'application/vnd.ibexa.api.BookmarkList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/BookmarkList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example',
],
],
],
Response::HTTP_UNAUTHORIZED => [
Expand Down
46 changes: 14 additions & 32 deletions src/lib/Server/Controller/Content/ContentCreateController.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,57 +32,39 @@
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',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The ContentCreate schema encoded in XML or JSON format.',
schema: [
'type' => 'string',
],
),
],
requestBody: new Model\RequestBody(
description: 'The ContentCreate schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.ContentCreate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentCreate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example',
],
'application/vnd.ibexa.api.ContentCreate+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentCreateWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example',
],
'application/vnd.ibexa.api.ContentCreate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentCreate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example',
],
]),
),
responses: [
Response::HTTP_CREATED => [
'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.',
'content' => [
'application/vnd.ibexa.api.Content+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Content',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example',
],
'application/vnd.ibexa.api.Content+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example',
],
'application/vnd.ibexa.api.Content+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Content',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example',
],
'application/vnd.ibexa.api.ContentInfo+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentInfoWrapper',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,20 @@
],
responses: [
Response::HTTP_OK => [
'description' => 'OK - returns the Version in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
'application/vnd.ibexa.api.Version+json' => [
'schema' => [
'$ref' => '#/components/schemas/VersionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example',
],
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
],
],
Response::HTTP_TEMPORARY_REDIRECT => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,6 @@
'Objects',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the updated version is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentId',
in: 'path',
Expand All @@ -49,18 +40,18 @@
Response::HTTP_CREATED => [
'description' => 'Created',
'content' => [
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
'application/vnd.ibexa.api.Version+json' => [
'schema' => [
'$ref' => '#/components/schemas/VersionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example',
],
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
],
],
Response::HTTP_UNAUTHORIZED => [
Expand All @@ -74,6 +65,7 @@
],
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,6 @@
'Objects',
],
parameters: [
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the updated version is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentId',
in: 'path',
Expand All @@ -55,18 +46,18 @@
Response::HTTP_CREATED => [
'description' => 'Created.',
'content' => [
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
'application/vnd.ibexa.api.Version+json' => [
'schema' => [
'$ref' => '#/components/schemas/VersionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example',
],
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
],
],
Response::HTTP_UNAUTHORIZED => [
Expand All @@ -77,6 +68,7 @@
],
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
],
],
requestBody: new Model\RequestBody(
description: 'No payload required',
content: new \ArrayObject(),
),
),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,21 +30,12 @@
new Model\Parameter(
name: 'If-None-Match',
in: 'header',
required: true,
required: false,
description: 'Only return the version if the given ETag is the not current one, otherwise a 304 is returned.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Accept',
in: 'header',
required: true,
description: 'If set, the version list is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentId',
in: 'path',
Expand All @@ -64,23 +55,24 @@
],
responses: [
Response::HTTP_OK => [
'description' => 'If set, the version list is returned in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
'application/vnd.ibexa.api.Version+json' => [
'schema' => [
'$ref' => '#/components/schemas/VersionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example',
],
'application/vnd.ibexa.api.Version+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Version',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example',
],
],
],
Response::HTTP_NOT_MODIFIED => [
'description' => 'Error - the ETag does not match the current one.',
'description' => 'Not Modified - the ETag matches the current one.',
],
Response::HTTP_UNAUTHORIZED => [
'description' => 'Error - the user is not authorized to read this content item.',
Expand Down
39 changes: 12 additions & 27 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 All @@ -63,28 +47,29 @@
],
responses: [
Response::HTTP_OK => [
'description' => 'OK - returns the Content or ContentInfo in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.Content+xml' => [
'schema' => [
'$ref' => '#/components/schemas/Content',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example',
],
'application/vnd.ibexa.api.Content+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example',
],
'application/vnd.ibexa.api.ContentInfo+xml' => [
'application/vnd.ibexa.api.Content+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentInfo',
'$ref' => '#/components/schemas/Content',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example',
],
'application/vnd.ibexa.api.ContentInfo+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentInfoWrapper',
],
],
'application/vnd.ibexa.api.ContentInfo+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentInfo',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example',
],
],
Expand Down
Loading
Loading