The provider data API (persistent) implements a REST API for retrieving and updating provider firm and office (and, later on, contract and schedule) data.
Includes the following subprojects:
provider-data-api- OpenAPI specification used for generating API stub interfaces and documentation.provider-data-service- REST API service with CRUD operations interfacing a JPA repository with an in-memory database.provider-data-e2e- End-to-end tests to target a running system.
- Build the application:
./gradlew clean build - Run integration tests:
./gradlew integrationTest - Run the application:
./gradlew bootRun - Build application container:
./gradlew bootBuildImage - Run end-to-end tests:
./gradlew :provider-data-e2e:e2eTest -Penv=local -Dauth.token=Dummy1
- Swagger UI: http://localhost:8080/swagger-ui/index.html
- OpenAPI specification (JSON): http://localhost:8080/v3/api-docs
The following actuator endpoints have been configured:
The project uses the laa-spring-boot-gradle-plugin Gradle plugin which provides sensible defaults
for the following plugins:
You can find more information regarding the setup and usage of the Gradle plugin in laa-spring-boot-common.
- Spring Boot Actuator - used to provide various endpoints to help monitor the application, such as view application health and information.
- Spring Boot WebMVC - used to provide features for building the REST API implementation.
- Spring Data JPA - used to simplify database access and interaction, by providing an abstraction over persistence technologies, to help reduce boilerplate code.
- Springdoc OpenAPI - used to generate OpenAPI documentation. It automatically generates Swagger UI, JSON documentation based on your Spring REST APIs.
- Lombok - used to help to reduce boilerplate Java code by automatically generating common methods like getters, setters, constructors etc. at compile-time using annotations.
- MapStruct - used for object mapping, specifically for converting between different Java object types, such as Data Transfer Objects (DTOs) and Entity objects. It generates mapping code at compile code.
- H2 - used to provide a database for testing only and should not be used in production.