Added UDS info endpoint
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
testing/ogcore-api/pipeline/head There was a failure building this commit
Details
parent
37b21c85a4
commit
1e2947b183
|
@ -84,4 +84,32 @@ class OrganizationalUnitController extends AbstractController
|
||||||
|
|
||||||
return new JsonResponse($data, Response::HTTP_OK);
|
return new JsonResponse($data, Response::HTTP_OK);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[Route('/opengnsys/rest//info', methods: ['GET'])]
|
||||||
|
public function getOpengnsysInfo(): JsonResponse
|
||||||
|
{
|
||||||
|
$data = [
|
||||||
|
"project" => "OpenGnsys",
|
||||||
|
"version" => "1.1.1d",
|
||||||
|
"codename" => "Espeto",
|
||||||
|
"definition" => "http://www.andalucia.com/gastronomy/espeto.htm",
|
||||||
|
"release" => "",
|
||||||
|
"ogagent" => "1.1.2",
|
||||||
|
"services" => [
|
||||||
|
"server",
|
||||||
|
"repository"
|
||||||
|
],
|
||||||
|
"oglive" =>
|
||||||
|
[
|
||||||
|
"distribution" => "focal",
|
||||||
|
"kernel" => "5.13.0-27-beta",
|
||||||
|
"architecture" => "amd64",
|
||||||
|
"revision" => "r20210706",
|
||||||
|
"directory" => "ogLive-5.13.0-r20210706",
|
||||||
|
"iso" => "ogLive-focal-5.13.0-27-beta-amd64-r20210706.5b4bf5f.iso"
|
||||||
|
]
|
||||||
|
];
|
||||||
|
|
||||||
|
return new JsonResponse($data, Response::HTTP_OK);
|
||||||
|
}
|
||||||
}
|
}
|
|
@ -785,8 +785,35 @@ final readonly class OpenApiFactory implements OpenApiFactoryInterface
|
||||||
]
|
]
|
||||||
])
|
])
|
||||||
));
|
));
|
||||||
}
|
|
||||||
|
|
||||||
|
$openApi->getPaths()->addPath('/opengnsys/rest//info', (new Model\PathItem())->withGet(
|
||||||
|
(new Model\Operation('getOpengnsysInfo'))
|
||||||
|
->withTags(['General'])
|
||||||
|
->withSummary('Obtener información general de OpenGnsys')
|
||||||
|
->withResponses([
|
||||||
|
Response::HTTP_OK => [
|
||||||
|
'description' => 'Información general de OpenGnsys',
|
||||||
|
'content' => [
|
||||||
|
'application/json' => [
|
||||||
|
'schema' => [
|
||||||
|
'type' => 'object',
|
||||||
|
'properties' => [
|
||||||
|
'project' => [
|
||||||
|
'type' => 'string',
|
||||||
|
'example' => 'OpenGnsys',
|
||||||
|
],
|
||||||
|
'version' => [
|
||||||
|
'type' => 'string',
|
||||||
|
'example' => '1.1.1d',
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
],
|
||||||
|
]
|
||||||
|
])
|
||||||
|
));
|
||||||
|
}
|
||||||
|
|
||||||
private function addInstallOgLiveWebhookEndpoint(OpenApi $openApi): void
|
private function addInstallOgLiveWebhookEndpoint(OpenApi $openApi): void
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue