Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.

hmcts/finrem-document-generator-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Document Generator

License: MIT Build Status codecov

This is a document generation service. This allows to generate documents based on a given template name and placeholder data in JSON format and will also store the generated document in the Evidence Management Store.

The service provides a single RESTful endpoint that will generate the document, store it in Evidence Management Store and return the link to the stored data.

Getting started

Prerequisites

Building

The project uses Gradle as a build tool but you don't have to install it locally since there is a ./gradlew wrapper script.

To build project please execute the following command:

./gradlew build

Running

First you need to create runnable jar by executing following command:

./gradlew clean build

When the lib has been created in build/lib directory, you can run the application by executing following command:

  1. Run
docker build . -t hmcts/finrem-document-generator-client:latest
  1. Export docmosis-api-access-key (ask finrem dev members to provide one)
export PDF_SERVICE_ACCESS_KEY=<ACTUAL_KEY>
  1. Run
docker-compose up

As a result the following container(s) will get created and started:

  • long living container for API application exposing port 4009

API documentation

API documentation is provided with Swagger:

  • http://localhost:4009/swagger-ui.html - UI to interact with the API resources

Developing

Unit tests

To run all unit tests please execute following command:

./gradlew test

Coding style tests

To run all checks (including unit tests) please execute following command:

./gradlew check

Mutation tests

To run all mutation tests execute the following command:

./gradlew pitest

Running additional tests in the Jenkins PR Pipeline

  1. Add one or more appropriate labels to your PR in GitHub. Valid labels are:
  • enable_fortify_scan
  1. Trigger a build of your PR in Jenkins. Fortify scans will take place asynchronously as part of the Static Checks/Container Build step.
  • Check the Blue Ocean view for live monitoring, and review the logs once complete for any issues.
  • As Fortify scans execute during the Static Checks/Container Build step, you will need to ensure this is triggered by making a minor change to the PR, such as bumping the chart version.

Standard API

We follow RESTful API standards.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Financial Remedy Document Generator Client API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages