server: port: 8080 shutdown: graceful ### technical configurations ### management: # for security, don't use same port as application server.port: 8081 health: livenessState.enabled: true readinessState.enabled: true endpoint: health: show-details: always probes.enabled: true group: readiness.include: readinessState,diskSpace,grpcChannel,grpc,rest liveness.include: livenessState endpoints.web.exposure.include: '*' # activate percentiles for web and grpc requests metrics.distribution.percentiles-histogram: grpc.server.processing.duration: true http.server.requests: true spring: main: banner-mode: off profiles: default: dev data.mongodb: uri: ${MONGODB_CONNECTION_STRING} auto-index-creation: true security: oauth2: resourceserver: jwt: jwk-set-uri: https://id.2martens.de/realms/2martens/protocol/openid-connect/certs # properties for application de.twomartens.wahlrecht: defaultTimeZone: Europe/Berlin greeting: "Hello %s" springdoc: swagger-ui: display-request-duration: true operationsSorter: method disable-swagger-default-url: true path: '/wahlrecht/v1/doc/' default-produces-media-type: 'application/json' api-docs: path: '/wahlrecht/v1/api-docs' openapi: description: | Open API Documentation for the Wahlrecht API ## Authenticate The API is secured by the need to provide bearer tokens. Anonymous access is supported with the user "anonymous" with password "anonymous". It grants access to all GET operations as well as the calculation of results. For changes to the database-stored data, you need a proper authorized user. The client_id is "wahlrecht", if you are on the Swagger UI and want to authorize there. ## Calculate election results If you want to calculate the result of the 2019 district election in Hamburg-Eimsbüttel, first GET it with /wahlrecht/v1/electionResult/by-election-name/Bezirkswahl%202019, and then POST it to /wahlrecht/v1/calculate. ## Changelog |Version | Change | Author | Date | | ------ | -------------------------------------- | ------ | ---------- | | 1.0 | added API Versioning (and changelog) | Jim | 13.07.2023 | version: 1.0 title: 'Wahlrecht API' resttemplate: timeout: readTimeoutRestHealthIndicatorInMillis: 5000 connectionRestHealthIndicatorTimeoutInMillis: 5000 readTimeoutRestTemplateInMillis: 5000 connectionRestTemplateTimeoutInMillis: 5000