Skip to content

navikt/syk-inn-api

Repository files navigation

syk-inn-api

Technologies used

  • Kotlin
  • Spring boot
  • Gradle

Prerequisites

Java

Make sure you have the Java JDK 21 installed You can check which version you have installed using this command:

java -version

Docker

Make sure you have the Docker installed You can check which version you have installed using this command:

docker --version

Docker compose

Make sure you have the Docker-compose installed You can check which version you have installed using this command:

docker-compose --version

Building the application

To build locally and run the integration tests you can simply run

./gradlew bootJar

or on windows gradlew.bat bootJar

Running the application locally

With bootRun

Note

Remember to run the external services the application needs to be able to run, see Running the application and the mock-oauth2-server from docker compose

run this command

SECURELOGS_DIR=./ AZURE_APP_WELL_KNOWN_URL='http://localhost:${mock-oauth2-server.port}/azuread/.well-known/openid-configuration' AZURE_APP_CLIENT_ID='syk-inn-api-client-id' AZURE_OPENID_CONFIG_TOKEN_ENDPOINT='http://localhost:${mock-oauth2-server.port}/azuread/token' SYFOHELSENETTPROXY_SCOPE=syfohelsenettproxyscope AZURE_APP_CLIENT_SECRET=secretzz MOCK_OAUTH2_SERVER_PORT=6969 KAFKA_BROKERS='localhost:9092' KAFKA_TRUSTSTORE_PATH='' KAFKA_CREDSTORE_PASSWORD='' KAFKA_SECURITY_PROTOCOL='PLAINTEXT' KAFKA_KEYSTORE_PATH='' SYFOSMREGLER_SCOPE=syfosmreglerscope AZURE_OPENID_CONFIG_ISSUER='http://localhost:${mock-oauth2-server.port}/azuread' ./gradlew bootRun

or on windows SECURELOGS_DIR=./ AZURE_APP_WELL_KNOWN_URL='http://localhost:${mock-oauth2-server.port}/azuread/.well-known/openid-configuration' AZURE_APP_CLIENT_ID='syk-inn-api-client-id' AZURE_OPENID_CONFIG_TOKEN_ENDPOINT='http://localhost:${mock-oauth2-server.port}/azuread/token' SYFOHELSENETTPROXY_SCOPE=syfohelsenettproxyscope AZURE_APP_CLIENT_SECRET=secretzz MOCK_OAUTH2_SERVER_PORT=6969 KAFKA_BROKERS='localhost:9092' KAFKA_TRUSTSTORE_PATH='' KAFKA_CREDSTORE_PASSWORD='' KAFKA_SECURITY_PROTOCOL='PLAINTEXT' KAFKA_KEYSTORE_PATH='' SYFOSMREGLER_SCOPE=syfosmreglerscope AZURE_OPENID_CONFIG_ISSUER='http://localhost:${mock-oauth2-server.port}/azuread' gradlew.bat bootRun

With docker

Creating a docker image

Creating a docker image should be as simple as

docker build -t syk-inn-api .

Note

Remember to build the application before,you create a docker image, see Building the application

Running the application and the mock-oauth2-server from docker compose

docker-compose up -d

Api doc

Locally http://localhost:8080/v3/api-docs or on http://syk-inn-api.intern.dev.nav.no:8080/v3/api-docs

Upgrading the gradle wrapper

Find the newest version of gradle here: https://gradle.org/releases/ Then run this command:

./gradlew wrapper --gradle-version $gradleVersjon

Contact

This project is maintained by navikt/tsm

Questions and/or feature requests? Please create an issue

If you work in @navikt you can reach us at the Slack channel #team-sykmelding

About

No description, website, or topics provided.

Resources

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •