This project provides REST based web services for exposing fees related information for hearing fee and award fees.
This is SpringBoot based java application. Please see the Jenkinsfile in root folder to see the build and deployment pipeline.
You will need jdk installed on your machine, and the fees_register database running, for which you can run:
docker-compose -f ./docker-compose.yml up fees-database
- Clone the repo to your machine using git clone [email protected]:hmcts/ccfr-fees-register-app.git
- Run $ ./gradlew build
To test locally all the tasks that run on the Jenkins master branch build, run:
./gradlew test # for unit tests
./gradlew smoke
./gradlew functional # but you will need some environment variables (see next section)
./gradlew fortifyScan
./gradlew pitest # for mutation testing
./gradlew runProviderPactVerification # to verify the provider contracts
export OAUTH2_CLIENT_SECRET=ask someone for this
export TEST_URL=http://fees-register-api-aat.service.core-compute-aat.internal
export IDAM_API_URL=https://idam-api.aat.platform.hmcts.net
export OAUTH2_REDIRECT_URI=https://fees-register-frontend-aat.service.core-compute-aat.internal/oauth2
See Jenkinsfile for the deployment details
To run the DB migration task locally, run
./gradlew --no-daemon '-Pdburl=localhost:5432/fees_register' -Pflyway.user=fees_register -Pflyway.password=fees_register migratePostgresDatabase
To run the application at local developer machine use following command
./gradlew bootRun
Once application server is started use swagger ui to find the endpoints and test these. http://localhost:8080/swagger-ui.html
or in dev/test environment you can use this link https://dev-proxy.fees-register.reform.hmcts.net/swagger-ui.html or https://test-proxy.fees-register.reform.hmcts.net/swagger-ui.html
Please add the below environmental variables in .env in ccfr-fees-register-app/.env
FEE_REGISTER_PASS = fees_register
OPENID_SPRING_DATASOURCE_PASSWORD = openidm
IDAM_SPI_FORGEROCK_AM_PASSWORD = Pa55word11
IDAM_SPI_FORGEROCK_IDM_PASSWORD = openidm-admin
IDAM_SPI_FORGEROCK_IDM_PIN_DEFAULTPASSWORD = BlaBlaBlackSh33p
SECURITY_OAUTH2_CLIENT_CLIENTSECRET = password
Then
docker-compose up
Some of the end points are as below. These might be out of date. Please look at the swagger-ui to be sure.
- GET /fees-register/cmc
- GET /fees-register/cmc/categories
- GET /fees-register/cmc/categories/{id}/ranges/{amount}/fees
- GET /fees-register/cmc/flat
- GET /fees-register/cmc/flat/{id}
We use SemVer for versioning.