Skip to content

ministryofjustice/probation-offender-search

Repository files navigation

probation-offender-search

CircleCI Docker API docs

API to provides searching of offender records in Delius via Elastic search

Intellij setup

  • Install JDK 21
  • Enable Gradle using JDK 21
  • Set JDK in project structure
  • Enable the lombok plugin and restart if necessary
  • Enable Annotation Processors at "Settings > Build > Compiler > Annotation Processors"

Health

  • /health/ping: will respond { status: "UP" } to all requests. This should be used by dependent systems to check connectivity to the offender search service.
  • /health: provides information about the application health and its dependencies. This should be used the notm-montor & PagerDuty.
  • /info: provides information about the version of the deployed application, used by the notm-monitor.

Running OpenSearch for tests

The integration tests use the 'test' profile and require an OpenSearch docker container:

$ docker-compose pull opensearch
$ docker-compose up opensearch

Running the test uk.gov.justice.hmpps.offendersearch.controllers.OffenderSearchAPIIntegrationTest will insert an Offender Index on the locally running OpenSearch instance and populate with Offender test data. OpenSearch has been added to the CircleCI configuration for the build pipeline too. See config.yml.

Building & Running

Note the OpenSearch container is required for both tests and local running.

$ ./gradlew test
$ SPRING_PROFILES_ACTIVE=dev,opensearch ./gradlew bootRun

About

Search API for people on probation

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published