Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -30,26 +30,18 @@
uriTemplate: '/content/typegroups/{contentTypeGroupId}/types',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.create_content_type',
summary: 'Create content type',
description: 'Creates a new content type draft in the given content type group.',
tags: [
'Type Groups',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the new content type or draft is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The content type Create schema encoded in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -64,35 +56,36 @@
),
],
requestBody: new Model\RequestBody(
description: 'The content type Create schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.ContentTypeCreate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeCreate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example',
],
'application/vnd.ibexa.api.ContentTypeCreate+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeCreateWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example',
],
'application/vnd.ibexa.api.ContentTypeCreate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeCreate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example',
],
]),
),
responses: [
Response::HTTP_CREATED => [
'description' => 'Content type created.',
'content' => [
'application/vnd.ibexa.api.ContentType+xml' => [
'application/vnd.ibexa.api.ContentType+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentType',
'$ref' => '#/components/schemas/ContentTypeWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example',
],
'application/vnd.ibexa.api.ContentType+json' => [
'application/vnd.ibexa.api.ContentType+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeWrapper',
'$ref' => '#/components/schemas/ContentType',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentType.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,62 +22,56 @@
uriTemplate: '/content/types/view',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.content_types.view',
summary: 'Filter content types',
description: 'Executes a query and returns a View including the results. The View input reflects the criteria model of the public PHP API.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The view in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The view input in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
],
requestBody: new Model\RequestBody(
description: 'The view input in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.ContentTypeViewInput+xml' => [
'application/vnd.ibexa.api.ContentTypeViewInput+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeViewInput',
'$ref' => '#/components/schemas/ContentTypeViewInputWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeCreateView.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeCreateView.json.example',
],
'application/vnd.ibexa.api.ContentTypeViewInput+json' => [
'application/vnd.ibexa.api.ContentTypeViewInput+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeViewInputWrapper',
'$ref' => '#/components/schemas/ContentTypeViewInput',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeCreateView.xml.example',
],
]),
),
responses: [
Response::HTTP_OK => [
'description' => 'The view in XML or JSON format.',
'content' => [
'application/vnd.ibexa.api.ContentTypeList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeInfoList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example',
],
'application/vnd.ibexa.api.ContentTypeList+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeInfoListWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example',
],
'application/vnd.ibexa.api.ContentTypeList+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeInfoList',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example',
],
],
],
Response::HTTP_BAD_REQUEST => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,22 @@
#[Delete(
uriTemplate: '/content/types/{contentTypeId}',
openapi: new Model\Operation(
operationId: 'ibexa.rest.delete_content_type',
summary: 'Delete content type',
description: 'Deletes the provided content type.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentTypeId',
in: 'path',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,18 @@
uriTemplate: '/content/types/{contentTypeId}',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.create_content_type_draft',
summary: 'Create Draft',
description: 'Creates a draft and updates it with the given data.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the new content type draft is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The content type Update schema encoded in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -60,36 +52,37 @@
),
],
requestBody: new Model\RequestBody(
description: 'The content type Update schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.ContentTypeUpdate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeUpdate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example',
],
'application/vnd.ibexa.api.ContentTypeUpdate+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeUpdateWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example',
],
'application/vnd.ibexa.api.ContentTypeUpdate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeUpdate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example',
],
]),
),
responses: [
Response::HTTP_CREATED => [
'description' => 'Draft created.',
'content' => [
'application/vnd.ibexa.api.ContentTypeInfo+xml' => [
'application/vnd.ibexa.api.ContentTypeInfo+json' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeInfo',
'$ref' => '#/components/schemas/ContentTypeInfoWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.json.example',
],
'application/vnd.ibexa.api.ContentTypeInfo+json' => [
'application/vnd.ibexa.api.ContentTypeInfo+xml' => [
'schema' => [
'$ref' => '#/components/schemas/ContentTypeInfoWrapper',
'$ref' => '#/components/schemas/ContentTypeInfo',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example',
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.xml.example',
],
],
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,22 @@
#[Delete(
uriTemplate: '/content/types/{contentTypeId}/draft',
openapi: new Model\Operation(
operationId: 'ibexa.rest.delete_content_type_draft',
summary: 'Delete content type draft',
description: 'Deletes the provided content type draft.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentTypeId',
in: 'path',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,26 +28,18 @@
uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.add_content_type_draft_field_definition',
summary: 'Add content type Draft Field definition',
description: 'Creates a new Field definition for the given content type.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'Accept',
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'If set, the new Field definition is returned in XML or JSON format.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'Content-Type',
in: 'header',
required: true,
description: 'The Field Definition Create schema encoded in XML or JSON format.',
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
Expand All @@ -62,36 +54,37 @@
),
],
requestBody: new Model\RequestBody(
description: 'The Field Definition Create schema encoded in XML or JSON format.',
content: new \ArrayObject([
'application/vnd.ibexa.api.FieldDefinitionCreate+xml' => [
'application/vnd.ibexa.api.FieldDefinitionCreate+json' => [
'schema' => [
'$ref' => '#/components/schemas/FieldDefinitionCreate',
'$ref' => '#/components/schemas/FieldDefinitionCreateWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example',
],
'application/vnd.ibexa.api.FieldDefinitionCreate+json' => [
'application/vnd.ibexa.api.FieldDefinitionCreate+xml' => [
'schema' => [
'$ref' => '#/components/schemas/FieldDefinitionCreateWrapper',
'$ref' => '#/components/schemas/FieldDefinitionCreate',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example',
],
]),
),
responses: [
Response::HTTP_CREATED => [
'description' => 'Field definition created.',
'content' => [
'application/vnd.ibexa.api.FieldDefinition+xml' => [
'schema' => [
'$ref' => '#/components/schemas/FieldDefinition',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example',
],
'application/vnd.ibexa.api.FieldDefinition+json' => [
'schema' => [
'$ref' => '#/components/schemas/FieldDefinitionWrapper',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example',
],
'application/vnd.ibexa.api.FieldDefinition+xml' => [
'schema' => [
'$ref' => '#/components/schemas/FieldDefinition',
],
'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinition.xml.example',
],
],
],
Response::HTTP_BAD_REQUEST => [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,22 @@
uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}',
extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false],
openapi: new Model\Operation(
operationId: 'ibexa.rest.remove_content_type_draft_field_definition',
summary: 'Delete content type Draft Field definition',
description: 'Deletes the provided Field definition.',
tags: [
'Type',
],
parameters: [
new Model\Parameter(
name: 'X-CSRF-Token',
in: 'header',
required: true,
description: 'The CSRF Token needed on all unsafe HTTP methods with session.',
schema: [
'type' => 'string',
],
),
new Model\Parameter(
name: 'contentTypeId',
in: 'path',
Expand Down
Loading
Loading