Migrate omsorgapp to browser SPA, add Docker/CI build setup
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Failing after 4s
Docker-Images bauen und veröffentlichen / build (VITE_OMSORG_CORE_URL=${{ vars.OMSORG_CORE_PUBLIC_URL }}, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgCore/Dockerfile, omsorgcore) (push) Successful in 3s
Docker-Images bauen und veröffentlichen / build (, omsorgWeb/Dockerfile, omsorgweb) (push) Failing after 4s
Docker-Images bauen und veröffentlichen / build (VITE_OMSORG_CORE_URL=${{ vars.OMSORG_CORE_PUBLIC_URL }}, omsorgapp/Dockerfile, omsorgapp) (push) Successful in 3s
- omsorgapp: drop Electron, run as a plain Vite/React browser app; refresh token moves to an HttpOnly cookie (omsorgCore), CORS added for the new browser origin, document download/preview switched to Blob-based browser APIs. - Add Dockerfiles for omsorgCore, omsorgapp, and omsorgWeb, a docker-compose.yml wiring Postgres/MySQL/all three apps together, and a Gitea Actions workflow that builds and pushes images to the repo's container registry on push to main and on version tags. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 5
parent
e9e96a57dc
commit
598dfcd38a
@@ -77,6 +77,9 @@ class EmployeesApi
|
||||
'apiEmployeesGet' => [
|
||||
'application/json',
|
||||
],
|
||||
'apiEmployeesIdDelete' => [
|
||||
'application/json',
|
||||
],
|
||||
'apiEmployeesIdGet' => [
|
||||
'application/json',
|
||||
],
|
||||
@@ -457,6 +460,220 @@ class EmployeesApi
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiEmployeesIdDelete
|
||||
*
|
||||
* @param string $id id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return void
|
||||
*/
|
||||
public function apiEmployeesIdDelete($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
|
||||
{
|
||||
$this->apiEmployeesIdDeleteWithHttpInfo($id, $contentType);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiEmployeesIdDeleteWithHttpInfo
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \OmsorgCoreClient\ApiException on non-2xx response or if the response body is not in the expected format
|
||||
* @throws \InvalidArgumentException
|
||||
* @return array of null, HTTP status code, HTTP response headers (array of strings)
|
||||
*/
|
||||
public function apiEmployeesIdDeleteWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
|
||||
{
|
||||
$request = $this->apiEmployeesIdDeleteRequest($id, $contentType);
|
||||
|
||||
try {
|
||||
$options = $this->createHttpClientOption();
|
||||
try {
|
||||
$response = $this->client->send($request, $options);
|
||||
} catch (RequestException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
$e->getResponse() ? $e->getResponse()->getHeaders() : null,
|
||||
$e->getResponse() ? (string) $e->getResponse()->getBody() : null
|
||||
);
|
||||
} catch (ConnectException $e) {
|
||||
throw new ApiException(
|
||||
"[{$e->getCode()}] {$e->getMessage()}",
|
||||
(int) $e->getCode(),
|
||||
null,
|
||||
null
|
||||
);
|
||||
}
|
||||
|
||||
$statusCode = $response->getStatusCode();
|
||||
|
||||
|
||||
return [null, $statusCode, $response->getHeaders()];
|
||||
} catch (ApiException $e) {
|
||||
switch ($e->getCode()) {
|
||||
}
|
||||
|
||||
|
||||
throw $e;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiEmployeesIdDeleteAsync
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiEmployeesIdDeleteAsync($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
|
||||
{
|
||||
return $this->apiEmployeesIdDeleteAsyncWithHttpInfo($id, $contentType)
|
||||
->then(
|
||||
function ($response) {
|
||||
return $response[0];
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiEmployeesIdDeleteAsyncWithHttpInfo
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Promise\PromiseInterface
|
||||
*/
|
||||
public function apiEmployeesIdDeleteAsyncWithHttpInfo($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
|
||||
{
|
||||
$returnType = '';
|
||||
$request = $this->apiEmployeesIdDeleteRequest($id, $contentType);
|
||||
|
||||
return $this->client
|
||||
->sendAsync($request, $this->createHttpClientOption())
|
||||
->then(
|
||||
function ($response) use ($returnType) {
|
||||
return [null, $response->getStatusCode(), $response->getHeaders()];
|
||||
},
|
||||
function ($exception) {
|
||||
$response = $exception->getResponse();
|
||||
$statusCode = $response->getStatusCode();
|
||||
throw new ApiException(
|
||||
sprintf(
|
||||
'[%d] Error connecting to the API (%s)',
|
||||
$statusCode,
|
||||
$exception->getRequest()->getUri()
|
||||
),
|
||||
$statusCode,
|
||||
$response->getHeaders(),
|
||||
(string) $response->getBody()
|
||||
);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create request for operation 'apiEmployeesIdDelete'
|
||||
*
|
||||
* @param string $id (required)
|
||||
* @param string $contentType The value for the Content-Type header. Check self::contentTypes['apiEmployeesIdDelete'] to see the possible values for this operation
|
||||
*
|
||||
* @throws \InvalidArgumentException
|
||||
* @return \GuzzleHttp\Psr7\Request
|
||||
*/
|
||||
public function apiEmployeesIdDeleteRequest($id, string $contentType = self::contentTypes['apiEmployeesIdDelete'][0])
|
||||
{
|
||||
|
||||
// verify the required parameter 'id' is set
|
||||
if ($id === null || (is_array($id) && count($id) === 0)) {
|
||||
throw new \InvalidArgumentException(
|
||||
'Missing the required parameter $id when calling apiEmployeesIdDelete'
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$resourcePath = '/api/employees/{id}';
|
||||
$formParams = [];
|
||||
$queryParams = [];
|
||||
$headerParams = [];
|
||||
$httpBody = '';
|
||||
$multipart = false;
|
||||
|
||||
|
||||
|
||||
// path params
|
||||
if ($id !== null) {
|
||||
$resourcePath = str_replace(
|
||||
'{' . 'id' . '}',
|
||||
ObjectSerializer::toPathValue($id),
|
||||
$resourcePath
|
||||
);
|
||||
}
|
||||
|
||||
|
||||
$headers = $this->headerSelector->selectHeaders(
|
||||
[],
|
||||
$contentType,
|
||||
$multipart
|
||||
);
|
||||
|
||||
// for model (json/xml)
|
||||
if (count($formParams) > 0) {
|
||||
if ($multipart) {
|
||||
$multipartContents = [];
|
||||
foreach ($formParams as $formParamName => $formParamValue) {
|
||||
$formParamValueItems = is_array($formParamValue) ? $formParamValue : [$formParamValue];
|
||||
foreach ($formParamValueItems as $formParamValueItem) {
|
||||
$multipartContents[] = [
|
||||
'name' => $formParamName,
|
||||
'contents' => $formParamValueItem
|
||||
];
|
||||
}
|
||||
}
|
||||
// for HTTP post (form)
|
||||
$httpBody = new MultipartStream($multipartContents);
|
||||
|
||||
} elseif (stripos($headers['Content-Type'], 'application/json') !== false) {
|
||||
# if Content-Type contains "application/json", json_encode the form parameters
|
||||
$httpBody = \GuzzleHttp\Utils::jsonEncode($formParams);
|
||||
} else {
|
||||
// for HTTP post (form)
|
||||
$httpBody = ObjectSerializer::buildQuery($formParams);
|
||||
}
|
||||
}
|
||||
|
||||
// this endpoint requires Bearer (JWT) authentication (access token)
|
||||
if (!empty($this->config->getAccessToken())) {
|
||||
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
|
||||
}
|
||||
|
||||
$defaultHeaders = [];
|
||||
if ($this->config->getUserAgent()) {
|
||||
$defaultHeaders['User-Agent'] = $this->config->getUserAgent();
|
||||
}
|
||||
|
||||
$headers = array_merge(
|
||||
$defaultHeaders,
|
||||
$headerParams,
|
||||
$headers
|
||||
);
|
||||
|
||||
$operationHost = $this->config->getHost();
|
||||
$query = ObjectSerializer::buildQuery($queryParams);
|
||||
return new Request(
|
||||
'DELETE',
|
||||
$operationHost . $resourcePath . ($query ? "?{$query}" : ''),
|
||||
$headers,
|
||||
$httpBody
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Operation apiEmployeesIdGet
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user