A microservice that maps a PIP2 Versioned application received from ms-health-capture-manager into HTML format to then generate a PDF using the HTML-TO-PDF_A microservice ms-html-to-pdfa
The API spec can be found at here
NOTE: The V1 api spec is deprecated alongside any associated methods that are not related to versioning
An example of the application data which is sent across from ms-health-capture-manager is available here
-
[Form specification model] (https://gitlab.com/dwp/health/pip-apply/libraries/form-specification-model)
-
HTML-TO-PDF_A micro-service ms-html-to-pdfa
To run the application locally you need to have a locally built version of pip-apply-mocks
- Clone repo above and then build using below command
docker build -t pipcs-api-registration .
- Run the docker-compose-local.yml file to spin up the application and dependencies locally
docker-compose -f docker-compose-local.yml up -d
To run unit tests
mvn clean verify
to build and vulnerability check
mvn spring-boot:run
or
java -jar target/ms-pip2-pdf-generator-<artifactId>.jar
Run the following command to spin up the service in docker
docker-compose up
Ensure the services are running in the background using docker
docker-compose -f docker-compose-local.yml up -d
Open another terminal window and run the following maven command to execute the tests locally
mvn clean verify -Papi-component-tests
The following are required config properties
Property | Example value | Description |
---|---|---|
HEALTH_CAPTURE_MANAGER_BASE_URL |
ms-health-capture-manager-url |
URL to ms-health-capture-manager |
HEALTH_CAPTURE_MANAGER_ENDPOINT_PATH |
form-specification/{formSpecificationId} |
Endpoint path within health-capture-manager to retrieve the formSpecification |
AWS_ENCRYPTION_DATA_KEY |
ksm-key |
|
AWS_S3_AWS_REGION |
eu-west-2 |
|
AWS_S3_BUCKET |
bucket-name |
Name of location in S3 to store generated PDF |
HTML_PDF_GENERATOR_BASE_URL |
ms-html-pdf-url |
URL to ms-html-to-pdfa micro-service |
HTML_PDF_GENERATOR_ENDPOINT_PATH |
generatePdf |
Endpoint path to ms-html-to-pdfa microservice |
HTML_PDF_GENERATOR_HTML_TO_PDF_CONFORMANCE_LEVEL |
PDFA_1_A |
pdf conformance level |
The docker image is built on the distroless base image
This repository often fails in pipeline with errors such as
cannot find docker...
To resolve this ensure that:
- Shared runners are enabled in the gitlab CI/CD settings
- Group runners are disabled in the gitlab CI/CD settings