Skip to content

Commit

Permalink
IBX-8173: OpenAPI compatible content type copy endpoint
Browse files Browse the repository at this point in the history
  • Loading branch information
barw4 committed Jul 2, 2024
1 parent 7138efe commit 8692557
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/bundle/Resources/config/routing.yml
Original file line number Diff line number Diff line change
Expand Up @@ -486,6 +486,16 @@ ibexa.rest.create_location:
# Content types


ibexa.rest.content_type.copy:
path: /content/types/{contentTypeId}
controller: Ibexa\Rest\Server\Controller\ContentType::copyContentType
condition: 'ibexa_get_media_type(request) === "CopyContentTypeInput"'
methods: [POST]
options:
options_route_suffix: 'CopyContentTypeInput'
requirements:
contentTypeId: \d+

ibexa.rest.load_content_type_group_list:
path: /content/typegroups
defaults:
Expand Down
1 change: 1 addition & 0 deletions tests/bundle/Functional/HttpOptionsTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ public function providerForTestHttpOptions(): array
['/content/typegroups/1', ['GET', 'PATCH', 'DELETE']],
['/content/typegroups/1/types', ['GET', 'POST']],
['/content/types', ['GET']],
['/content/types/1', ['POST'], 'CopyContentTypeInput+json'],
['/content/types/1', ['COPY', 'GET', 'POST', 'DELETE']],
['/content/types/1/draft', ['DELETE', 'GET', 'PATCH', 'PUBLISH']],
['/content/types/1/fieldDefinitions', ['GET']],
Expand Down

0 comments on commit 8692557

Please sign in to comment.