Skip to content

A service for resettlement passport to prepare prisoner for release proof of concept

License

Notifications You must be signed in to change notification settings

ministryofjustice/hmpps-resettlement-passport-api

Repository files navigation

hmpps-resettlement-passport-api

repo standards badge CircleCI API docs

Resettlement Passport API

This is a Backend-For-Frontend style API that support both the Prepare someone for release and Plan your future frontends

Running locally

Using the dev environment for auth

  • Start the database and stubs with docker compose -f docker-compose-local.yml up -d
  • Make sure to set environment variables for RESETTLEMENT_PASSPORT_API_CLIENT_ID and RESETTLEMENT_PASSPORT_API_CLIENT_SECRET
  • start with gradle bootrun (it will automatically use the local profile)

Yaml autocomplete/validation

Setting up the schema association

Questions for a Prepare someone for release report are defined in yaml, see for example accommodation-assessment-v1.yml

To get autocomplete for these files in intelliJ you can use the assessment-schema.json

Add it as a JSON schema mapping in Languages and Frameworks -> Schemas and DTDs -> JSON Schema Mappings

intellij config menu

Regenerating the schema

If the yaml structure changes, rerun the GenerateAssessmentSchema file and commit the changes.

Testing wiremock stubs locally

  • build the docker image: docker build -f stubs.Dockerfile -t stubs .
  • run the stubs locally on port 8080: docker run -p 8080:8080 stubs
  • test it, for example: http://localhost:8080/resettlement-passport-and-delius-api/appointments/U338861

About

A service for resettlement passport to prepare prisoner for release proof of concept

Topics

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published