Native PDF Annotator is a backend service that manages native annotations on PDF documents. In addition, the Native PDF Annotator handles requests from the Media Viewer to markup sensitive content in a case document and subsequent requests to redact marked up content..
It uses:
- Java21
- Spring boot
- Junit, Mockito and SpringBootTest
- Gradle
- lombok project - Lombok project
- lombok plugin - Lombok IDEA plugin
git clone https://github.com/hmcts/em-native-pdf-annotator-app.git
cd em-native-pdf-annotator-app/
./gradlew clean
./gradlew build
To run just the unit tests:
./gradlew test
To run the integration tests:
Requires docker desktop running
./gradlew integration
Requires docker desktop running.
You need to be logged in to Azure and have access to the ACR registry to pull the necessary containers for the application to run.
If you are not logged in, you can do so by running az login in your terminal.
Followed by az acr login --name hmctsprod to log in to the ACR registry.
./gradlew bootWithCCD
To run the project functional tests, first ensure you have run ./gradlew bootWithCCD as in the above setup instructions, then run
./gradlew functional
To view our REST API go to http://{HOST}/swagger-ui/index.html On local machine with server up and running, link to swagger is as below
http://localhost:8080/swagger-ui/index.html if running on AAT, replace localhost with ingressHost data inside values.yaml class in the necessary component, making sure port number is also removed.
A list of our endpoints can be found here
This project is licensed under the MIT License - see the LICENSE file for details
For executing the pact consumer test run
./gradlew contract
The results of the consumer test will be published to the pact folder in the root directory of the project.
To run the provider pact tests, first comment the broker configuration in the NpaPactProviderTest and NpaPactRedactionProviderTest classes and uncomment the pact folder configuration, then run the below command to execute the provider pact tests locally.
./gradlew providerContractTests