Skip to content

Commit 4b3aa64

Browse files
committed
#663 - Standardized API endpoint to serve configuration for the frontend
- add endpoint to swagger docu - convert the two threshold paramters to int
1 parent 801e11f commit 4b3aa64

File tree

2 files changed

+55
-4
lines changed

2 files changed

+55
-4
lines changed

src/main/java/de/numcodex/feasibility_gui_backend/settings/SettingsController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,10 @@ public class SettingsController {
2828
private String dseUrl;
2929

3030
@Value("${app.privacy.threshold.sites}")
31-
private String lowerboundaryLocationResult;
31+
private int lowerboundaryLocationResult;
3232

3333
@Value("${app.privacy.threshold.results}")
34-
private String lowerboundardyPatientResult;
34+
private int lowerboundardyPatientResult;
3535

3636
@Value("${app.privacy.quota.read.resultDetailedObfuscated.interval}")
3737
private String pollingInterval;
@@ -47,7 +47,7 @@ public class SettingsController {
4747

4848

4949
@GetMapping("/.settings")
50-
public Map<String, String> getSettings() {
50+
public Map<String, Object> getSettings() {
5151
return Map.of(
5252
KEY_DSE_URL, dseUrl,
5353
KEY_LOCATION_RESULT_LOWERBOUNDARY, lowerboundaryLocationResult,

src/main/resources/static/v3/api-docs/swagger.yaml

Lines changed: 52 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -869,13 +869,27 @@ paths:
869869
operationId: ''
870870
responses:
871871
200:
872-
description: Successful health information.
872+
description: Successful build information.
873873
content:
874874
application/vnd.spring-boot.actuator.v3+json:
875875
schema:
876876
$ref: "#/components/schemas/SystemInfo"
877877
tags:
878878
- intrinsics
879+
/.settings:
880+
get:
881+
summary: Offers config settings needed by the frontend.
882+
description: ''
883+
operationId: ''
884+
responses:
885+
200:
886+
description: Successful health information.
887+
content:
888+
application/json:
889+
schema:
890+
$ref: "#/components/schemas/SettingsInfo"
891+
tags:
892+
- intrinsics
879893
components:
880894
schemas:
881895
Dataquery:
@@ -1668,6 +1682,43 @@ components:
16681682
$ref: "#/components/schemas/BuildInfo"
16691683
terminology:
16701684
$ref: "#/components/schemas/Terminology"
1685+
SettingsInfo:
1686+
type: object
1687+
properties:
1688+
ccdlVersion:
1689+
type: string
1690+
examples:
1691+
- v1
1692+
pollingintervall:
1693+
type: string
1694+
format: duration
1695+
examples:
1696+
- PT10S
1697+
dsePatientProfileUrl:
1698+
type: string
1699+
examples:
1700+
- https://www.medizininformatik-initiative.de/fhir/core/modul-person/StructureDefinition/PatientPseudonymisiert
1701+
uiBackendApiUrl:
1702+
type: string
1703+
examples:
1704+
- /api/v5
1705+
lowerboundarypatientresult:
1706+
type: number
1707+
examples:
1708+
- 20
1709+
proposalPortalLink:
1710+
type: string
1711+
examples:
1712+
- https://antrag.forschen-fuer-gesundheit.de
1713+
lowerboundarylocationresult:
1714+
type: number
1715+
examples:
1716+
- 3
1717+
pollingtime:
1718+
type: string
1719+
format: duration
1720+
examples:
1721+
- PT10S
16711722
securitySchemes:
16721723
dataportal_auth:
16731724
type: oauth2

0 commit comments

Comments
 (0)