Skip to content
Merged
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
29 changes: 16 additions & 13 deletions src/bundle/Resources/api_platform/schemas/base_schemas.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,16 @@ schemas:
$ref: "#/components/schemas/BaseObject"
UnixTimestamp:
type: integer
Href:
type: object
required:
- _href
properties:
_href:
xml:
attribute: true
name: href
type: string
Href:
type: object
required:
- _href
properties:
_href:
xml:
attribute: true
name: href
type: string
Target:
description: Struct that stores extra target information for a SortClause object.
type: object
Expand Down Expand Up @@ -76,7 +76,8 @@ schemas:
type: string
"#text":
description: Content type description.
type: [string, 'null']
type: string
nullable: true
ValueObject:
type: object
required:
Expand Down Expand Up @@ -109,7 +110,8 @@ schemas:
type: string
"#text":
description: Translation contents.
type: [string, 'null']
type: string
nullable: true
KeyValue:
description: Key-value structure
type: object
Expand All @@ -120,7 +122,8 @@ schemas:
_key:
type: string
"#text":
type: [string, 'null']
type: string
nullable: true
DateRange:
allOf:
- $ref: "#/components/schemas/BaseObject"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,8 @@ schemas:
type: string
urlAliasSchema:
description: URL alias schema. If nothing is provided, $nameSchema will be used instead.
type: [ string, 'null' ]
type: string
nullable: true
nameSchema:
description: Name schema. Can be composed of FieldDefinition identifier place holders.
type: string
Expand Down Expand Up @@ -233,7 +234,8 @@ schemas:
remoteId:
type: string
urlAliasSchema:
type: [ string, 'null' ]
type: string
nullable: true
nameSchema:
type: string
isContainer:
Expand Down Expand Up @@ -354,7 +356,8 @@ schemas:
type: string
urlAliasSchema:
description: URL alias schema. If nothing is provided, $nameSchema will be used instead.
type: [ string, 'null' ]
type: string
nullable: true
nameSchema:
description: Name schema. Can be composed of FieldDefinition identifier place holders.
type: string
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ schemas:
properties:
languageId:
description: The language ID (auto generated).
type: [string, 'null']
type: string
nullable: true
languageCode:
description: The languageCode code.
type: string
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Server/Controller/Bookmark/BookmarkListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Ibexa\Rest\Server\Controller\Bookmark;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\BookmarkService;
use Ibexa\Contracts\Core\Repository\LocationService;
Expand All @@ -21,6 +22,7 @@
#[Get(
uriTemplate: '/bookmark',
name: 'List of bookmarks',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Lists bookmarked Locations for the current user.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\Content;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Controller as RestController;
use Ibexa\Rest\Server\Values;
Expand All @@ -16,6 +17,7 @@
#[Get(
uriTemplate: '/content/objects/{contentId}/relations',
name: 'Load Relations of content item',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Redirects to the Relations of the current version.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\Content;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Controller as RestController;
use Ibexa\Rest\Server\Exceptions\BadRequestException;
Expand All @@ -18,6 +19,7 @@
#[Get(
uriTemplate: '/content/objects',
name: 'Load content by remote ID',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Loads content item for a given remote ID.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\Content;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Controller as RestController;
use Ibexa\Rest\Server\Values\VersionList;
Expand All @@ -17,6 +18,7 @@
#[Get(
uriTemplate: '/content/objects/{contentId}/versions',
name: 'List versions',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of all versions of the content item. This method does not include fields and relations in the version elements of the response.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ContentType;

use ApiPlatform\Metadata\Delete;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Rest\Exceptions;
Expand All @@ -19,6 +20,7 @@
#[Delete(
uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}',
name: 'Delete content type Draft Field definition',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Deletes the provided Field definition.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ContentType;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\Values\Content\Language;
Expand All @@ -22,6 +23,7 @@
#[Get(
uriTemplate: '/content/types',
name: 'List content types',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of content types.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ContentType;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentTypeService;
use Ibexa\Contracts\Core\Repository\Values\Content\Language;
Expand All @@ -19,6 +20,7 @@
#[Get(
uriTemplate: '/content/typegroups/{contentTypeGroupId}/types',
name: 'List content types for group',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of content types in the provided group.',
tags: [
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Server/Controller/Language/LanguageListController.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Ibexa\Rest\Server\Controller\Language;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\LanguageService;
use Ibexa\Rest\Server\Controller as RestController;
Expand All @@ -19,6 +20,7 @@
#[Get(
uriTemplate: '/languages',
name: 'Language list',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Lists languages',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
namespace Ibexa\Rest\Server\Controller\Language;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\LanguageService;
use Ibexa\Contracts\Core\Repository\Values\Content\Language as ApiLanguage;
Expand All @@ -18,6 +19,7 @@
#[Get(
uriTemplate: '/languages/{code}',
name: 'Get language',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
tags: [
'Language',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ObjectState;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\ObjectStateService;
Expand All @@ -19,6 +20,7 @@
#[Get(
uriTemplate: '/content/objectstategroups',
name: 'List Object state groups',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of all Object state groups.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ObjectState;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\ObjectStateService;
Expand All @@ -19,6 +20,7 @@
#[Get(
uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates',
name: 'List Object states',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of all Object states of the given group.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\ObjectState;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Core\Repository\ContentService;
use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException;
Expand All @@ -20,6 +21,7 @@
#[Get(
uriTemplate: '/content/objects/{contentId}/objectstates',
name: 'Get Object states of content item',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns the Object states of a content item',
tags: [
Expand Down Expand Up @@ -61,13 +63,11 @@
'schema' => [
'$ref' => '#/components/schemas/ContentObjectStates',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example',
],
'application/vnd.ibexa.api.ContentObjectStates+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentObjectStatesWrapper',
'$ref' => '#/components/schemas/ContentObjectStates',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Values;
use Symfony\Component\HttpFoundation\Response;

#[Get(
uriTemplate: '/user/groups/{path}/roles',
name: 'Load Roles for User Group',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of all Roles assigned to the given User Group.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Rest\Exceptions;
use Ibexa\Rest\Server\Values;
Expand All @@ -17,6 +18,7 @@
#[Get(
uriTemplate: '/user/groups/{path}/roles/{roleId}',
name: 'Load User Group Role Assignment',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a Role assignment of the given User Group.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Values;
use Symfony\Component\HttpFoundation\Response;

#[Get(
uriTemplate: '/user/users/{userId}/roles',
name: 'Load Roles for User',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a list of all Roles assigned to the given User.',
tags: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Get;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Contracts\Rest\Exceptions;
use Ibexa\Rest\Server\Values;
Expand All @@ -17,6 +18,7 @@
#[Get(
uriTemplate: '/user/users/{userId}/roles/{roleId}',
name: 'Load User Role Assignment',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'Returns a Role assignment to the given User.',
tags: [
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Server/Controller/Role/RoleDeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Delete;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Values;
use Symfony\Component\HttpFoundation\Response;

#[Delete(
uriTemplate: '/user/roles/{id}',
name: 'Delete Role',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'The given Role and all assignments to Users or User Groups are deleted.',
tags: [
Expand Down
2 changes: 2 additions & 0 deletions src/lib/Server/Controller/Role/RoleDraftDeleteController.php
Original file line number Diff line number Diff line change
Expand Up @@ -8,13 +8,15 @@
namespace Ibexa\Rest\Server\Controller\Role;

use ApiPlatform\Metadata\Delete;
use ApiPlatform\OpenApi\Factory\OpenApiFactory;
use ApiPlatform\OpenApi\Model;
use Ibexa\Rest\Server\Values;
use Symfony\Component\HttpFoundation\Response;

#[Delete(
uriTemplate: '/user/roles/{id}/draft',
name: 'Delete Role draft',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
summary: 'The given Role draft is deleted.',
tags: [
Expand Down
Loading
Loading