resources:
    App\Entity\OrganizationalUnit:
        processor: App\State\Processor\OrganizationalUnitProcessor
        output: App\Dto\Output\OrganizationalUnitOutput
        input: App\Dto\Input\OrganizationalUnitInput
        normalizationContext:
            groups: ['default', 'organizational-unit:read']
        denormalization_context:
            groups: ['organizational-unit:write']
        operations:
            ApiPlatform\Metadata\GetCollection:
                provider: App\State\Provider\OrganizationalUnitProvider
                filters:
                    - 'api_platform.filter.organizational_unit.order'
                    - 'api_platform.filter.organizational_unit.search'
                    - 'api_platform.filter.organizational_unit.group_filter'

            ApiPlatform\Metadata\Get:
                security: 'is_granted("ORGANIZATIONAL_UNIT_VIEW", object)'
                provider: App\State\Provider\OrganizationalUnitProvider
                securityMessage: 'Sorry, but you are not allowed to access this resource.'
            ApiPlatform\Metadata\Put:
                provider: App\State\Provider\OrganizationalUnitProvider
            ApiPlatform\Metadata\Patch:
                provider: App\State\Provider\OrganizationalUnitProvider
                validationContext:
                    groups: ['organizational-unit:patch' ]
            ApiPlatform\Metadata\Post: ~
            ApiPlatform\Metadata\Delete: ~
            change_parent:
                class: ApiPlatform\Metadata\Post
                method: POST
                input: false
                uriTemplate: /organizational-units/{uuid}/change-parent
                controller: App\Controller\OrganizationalUnitChangeParentAction

properties:
    App\Entity\OrganizationalUnit:
        id:
            identifier: false
        uuid:
            identifier: true