Updated Open APi docu
testing/ogcore-api/pipeline/head There was a failure building this commit Details

develop-jenkins
Manuel Aranda Rosales 2024-10-08 17:04:11 +02:00
parent d3c43f4f81
commit 29a222bc96
2 changed files with 46 additions and 3 deletions

View File

@ -132,7 +132,6 @@ class LoadOrganizationalUnitDefaultCommand extends Command
$clientEntity->setMaintenance(false); $clientEntity->setMaintenance(false);
$clientEntity->setOrganizationalUnit($classroomEntity); $clientEntity->setOrganizationalUnit($classroomEntity);
$this->entityManager->persist($clientEntity); $this->entityManager->persist($clientEntity);
} }
} }

View File

@ -744,7 +744,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(['Organizational Unit']) ->withTags(['UDS'])
->withSummary('Obtener los laboratorios de una Unidad Organizacional específica') ->withSummary('Obtener los laboratorios de una Unidad Organizacional específica')
->withParameters([ ->withParameters([
new Model\Parameter( new Model\Parameter(
@ -786,9 +786,53 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
]) ])
)); ));
$openApi->getPaths()->addPath('/opengnsys/rest//ous/{centerId}/images', (new Model\PathItem())->withGet(
(new Model\Operation('getImages'))
->withTags(['UDS'])
->withSummary('Obtener las imágenes de una Unidad Organizacional específica')
->withParameters([
new Model\Parameter(
'centerId',
'path',
'El ID de la Unidad Organizacional',
true,
false,
)
])
->withResponses([
Response::HTTP_OK => [
'description' => 'Lista de Imagenes',
'content' => [
'application/json' => [
'schema' => [
'type' => 'array',
'items' => [
'type' => 'object',
'properties' => [
'id' => [
'type' => 'integer',
'example' => 1,
],
'name' => [
'type' => 'string',
'example' => 'Nombre del Laboratorio',
],
'description' => [
'type' => 'string',
'example' => 'Descripción del Laboratorio',
]
]
]
]
]
]
]
])
));
$openApi->getPaths()->addPath('/opengnsys/rest//info', (new Model\PathItem())->withGet( $openApi->getPaths()->addPath('/opengnsys/rest//info', (new Model\PathItem())->withGet(
(new Model\Operation('getOpengnsysInfo')) (new Model\Operation('getOpengnsysInfo'))
->withTags(['General']) ->withTags(['UDS'])
->withSummary('Obtener información general de OpenGnsys') ->withSummary('Obtener información general de OpenGnsys')
->withResponses([ ->withResponses([
Response::HTTP_OK => [ Response::HTTP_OK => [