Skip to content

Commit

Permalink
use string for class name (#621)
Browse files Browse the repository at this point in the history
  • Loading branch information
lukmzig authored Dec 9, 2024
1 parent d15a9d8 commit 6c5b810
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 46 deletions.
44 changes: 0 additions & 44 deletions src/DataObject/Attribute/Parameter/Query/ClassNameParameter.php

This file was deleted.

9 changes: 7 additions & 2 deletions src/DataObject/Controller/TreeController.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
use OpenApi\Attributes\Get;
use Pimcore\Bundle\StudioBackendBundle\Controller\AbstractApiController;
use Pimcore\Bundle\StudioBackendBundle\DataIndex\Request\DataObjectParameters;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Attribute\Parameter\Query\ClassNameParameter;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Attribute\Response\Property\AnyOfDataObjects;
use Pimcore\Bundle\StudioBackendBundle\DataObject\Service\DataObjectServiceInterface;
use Pimcore\Bundle\StudioBackendBundle\Exception\Api\AccessDeniedException;
Expand All @@ -37,6 +36,7 @@
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Query\PathIncludeDescendantsParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Query\PathIncludeParentParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Query\PathParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Parameter\Query\TextFieldParameter;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\Content\CollectionJson;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\DefaultResponses;
use Pimcore\Bundle\StudioBackendBundle\OpenApi\Attribute\Response\SuccessResponse;
Expand Down Expand Up @@ -85,12 +85,17 @@ public function __construct(
#[PathParameter]
#[PathIncludeParentParameter]
#[PathIncludeDescendantsParameter]
#[ClassNameParameter]
#[TextFieldParameter(
name: 'className',
description: 'Filter by class.',
example: 'Car'
)]
#[SuccessResponse(
description: 'data_object_get_tree_success_response',
content: new CollectionJson(new AnyOfDataObjects())
)]
#[DefaultResponses([
HttpResponseCodes::BAD_REQUEST,
HttpResponseCodes::UNAUTHORIZED,
HttpResponseCodes::NOT_FOUND,
])]
Expand Down

0 comments on commit 6c5b810

Please sign in to comment.