resources:
    App\Entity\GitRepository:
        processor: App\State\Processor\GitRepositoryProcessor
        input: App\Dto\Input\GitRepositoryInput
        output: App\Dto\Output\GitRepositoryOutput
        normalizationContext:
            groups: ['default', 'git-repository:read']
        denormalizationContext:
            groups: ['git-repository:write']
        operations:
            ApiPlatform\Metadata\GetCollection:
                provider: App\State\Provider\GitRepositoryProvider
                filters:
                    - 'api_platform.filter.git_repository.order'
                    - 'api_platform.filter.git_repository.search'
                openapiContext:
                    summary: 'Obtener lista de repositorios Git'
                    description: 'Obtiene todos los repositorios Git de un servidor específico'
                    parameters:
                        - name: 'repository'
                          in: 'query'
                          required: true
                          schema:
                              type: 'integer'
                          description: 'ID del ImageRepository que contiene los repositorios'
                        - name: 'page'
                          in: 'query'
                          schema:
                              type: 'integer'
                              default: 1
                          description: 'Número de página'
                        - name: 'limit'
                          in: 'query'
                          schema:
                              type: 'integer'
                              default: 10
                          description: 'Elementos por página'

            ApiPlatform\Metadata\Get:
                provider: App\State\Provider\GitRepositoryProvider
                openapiContext:
                    summary: 'Obtener un repositorio Git específico'
                    description: 'Obtiene un repositorio Git específico por su nombre'
                    parameters:
                        - name: 'repository'
                          in: 'query'
                          required: true
                          schema:
                              type: 'integer'
                          description: 'ID del ImageRepository'

            ApiPlatform\Metadata\Put:
                provider: App\State\Provider\GitRepositoryProvider
                openapiContext:
                    summary: 'Actualizar un repositorio Git'
                    description: 'Actualiza un repositorio Git existente en el servidor externo'
                    parameters:
                        - name: 'repository'
                          in: 'query'
                          required: true
                          schema:
                              type: 'integer'
                          description: 'ID del ImageRepository'

            ApiPlatform\Metadata\Patch:
                provider: App\State\Provider\GitRepositoryProvider
                openapiContext:
                    summary: 'Actualizar parcialmente un repositorio Git'
                    description: 'Actualiza parcialmente un repositorio Git existente'
                    parameters:
                        - name: 'repository'
                          in: 'query'
                          required: true
                          schema:
                              type: 'integer'
                          description: 'ID del ImageRepository'

            ApiPlatform\Metadata\Post:
                openapiContext:
                    summary: 'Crear un nuevo repositorio Git'
                    description: 'Crea un nuevo repositorio Git en el servidor externo. El ID del ImageRepository debe incluirse en el body del request.'

            ApiPlatform\Metadata\Delete:
                openapiContext:
                    summary: 'Eliminar un repositorio Git'
                    description: 'Elimina un repositorio Git del servidor externo'
                    parameters:
                        - name: 'repository'
                          in: 'query'
                          required: true
                          schema:
                              type: 'integer'
                          description: 'ID del ImageRepository'

            git_deploy_image:
                shortName: Deploy Git Image
                description: Deploy Git image
                class: ApiPlatform\Metadata\Post
                method: POST
                input: App\Dto\Input\DeployGitImageInput
                uriTemplate: /git-repositories/deploy-image
                controller: App\Controller\DeployGitImageAction


            git_update_image:
                shortName: Update Git Image
                description: Update Git image
                class: ApiPlatform\Metadata\Post
                method: POST
                input: App\Dto\Input\UpdateGitImageInput
                uriTemplate: /git-repositories/update-image
                controller: App\Controller\UpdateGitImageAction

            get_git_data:
                shortName: Get Git Data
                description: Get Git data
                class: ApiPlatform\Metadata\Post
                method: POST
                input: App\Dto\Input\GetGitDataInput
                uriTemplate: /git-repositories/get-git-data
                controller: App\Controller\OgAgent\GetGitDataAction

properties:
    App\Entity\GitRepository:
        id:
            identifier: false
        name:
            identifier: true 