Test endpoint
testing/ogcore-api/pipeline/head This commit looks good
Details
testing/ogcore-api/pipeline/head This commit looks good
Details
parent
2ddaba51d9
commit
8ff975743a
|
@ -11,7 +11,7 @@ use Symfony\Component\HttpFoundation\JsonResponse;
|
||||||
use Symfony\Component\HttpFoundation\Request;
|
use Symfony\Component\HttpFoundation\Request;
|
||||||
use Symfony\Component\HttpFoundation\Response;
|
use Symfony\Component\HttpFoundation\Response;
|
||||||
use Symfony\Component\HttpKernel\Attribute\AsController;
|
use Symfony\Component\HttpKernel\Attribute\AsController;
|
||||||
use Symfony\Component\Routing\Annotation\Route;
|
use Symfony\Component\Routing\Attribute\Route;
|
||||||
|
|
||||||
#[AsController]
|
#[AsController]
|
||||||
class OrganizationalUnitController extends AbstractController
|
class OrganizationalUnitController extends AbstractController
|
||||||
|
@ -41,8 +41,9 @@ class OrganizationalUnitController extends AbstractController
|
||||||
return new JsonResponse($data, Response::HTTP_OK);
|
return new JsonResponse($data, Response::HTTP_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/opengnsys/rest/ous/{centerId}/labs', name: 'get_classrooms', methods: ['GET'])]
|
||||||
#[Route('/opengnsys/rest//ous/{centerId}/labs', methods: ['GET'])]
|
#[Route('/opengnsys/rest//ous/{centerId}/labs', methods: ['GET'])]
|
||||||
public function getClassrooms(Request $request, string $centerId): JsonResponse
|
public function getClassrooms(int $centerId): JsonResponse
|
||||||
{
|
{
|
||||||
$classrooms = $this->entityManager
|
$classrooms = $this->entityManager
|
||||||
->getRepository(OrganizationalUnit::class)
|
->getRepository(OrganizationalUnit::class)
|
||||||
|
@ -64,8 +65,9 @@ class OrganizationalUnitController extends AbstractController
|
||||||
return new JsonResponse($data, Response::HTTP_OK);
|
return new JsonResponse($data, Response::HTTP_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/opengnsys/rest/ous/{centerId}/images', name: 'getImages', methods: ['GET'])]
|
||||||
#[Route('/opengnsys/rest//ous/{centerId}/images', methods: ['GET'])]
|
#[Route('/opengnsys/rest//ous/{centerId}/images', methods: ['GET'])]
|
||||||
public function getImages(Request $request, int $centerId): JsonResponse
|
public function getImages(int $centerId): JsonResponse
|
||||||
{
|
{
|
||||||
$parent = $this->entityManager
|
$parent = $this->entityManager
|
||||||
->getRepository(OrganizationalUnit::class)
|
->getRepository(OrganizationalUnit::class)
|
||||||
|
|
|
@ -20,7 +20,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
||||||
|
|
||||||
$this->addRefreshToken($openApi);
|
$this->addRefreshToken($openApi);
|
||||||
$this->addOgAgentEndpoints($openApi);
|
$this->addOgAgentEndpoints($openApi);
|
||||||
//$this->addUDsEndpoints($openApi);
|
$this->addUDsEndpoints($openApi);
|
||||||
$this->addStatusEndpoint($openApi);
|
$this->addStatusEndpoint($openApi);
|
||||||
$this->addInstallOgLiveWebhookEndpoint($openApi);
|
$this->addInstallOgLiveWebhookEndpoint($openApi);
|
||||||
|
|
||||||
|
@ -742,7 +742,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
||||||
])
|
])
|
||||||
));
|
));
|
||||||
|
|
||||||
$openApi->getPaths()->addPath('/opengnsys/rest//ous/{centerId}/labs', (new Model\PathItem())->withGet(
|
$openApi->getPaths()->addPath('/opengnsys/rest/ous/{centerId}/labs', (new Model\PathItem())->withGet(
|
||||||
(new Model\Operation('getClassrooms'))
|
(new Model\Operation('getClassrooms'))
|
||||||
->withTags(['UDS'])
|
->withTags(['UDS'])
|
||||||
->withSummary('Obtener los laboratorios de una Unidad Organizacional específica')
|
->withSummary('Obtener los laboratorios de una Unidad Organizacional específica')
|
||||||
|
@ -786,7 +786,7 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
||||||
])
|
])
|
||||||
));
|
));
|
||||||
|
|
||||||
$openApi->getPaths()->addPath('/opengnsys/rest//ous/{centerId}/images', (new Model\PathItem())->withGet(
|
$openApi->getPaths()->addPath('/opengnsys/rest/ous/{centerId}/images', (new Model\PathItem())->withGet(
|
||||||
(new Model\Operation('getImages'))
|
(new Model\Operation('getImages'))
|
||||||
->withTags(['UDS'])
|
->withTags(['UDS'])
|
||||||
->withSummary('Obtener las imágenes de una Unidad Organizacional específica')
|
->withSummary('Obtener las imágenes de una Unidad Organizacional específica')
|
||||||
|
|
Loading…
Reference in New Issue