This API grants access to user account information and associated functionalities. It streamlines interactions with user resources within the system.
For more detailed information and related Confluence pages, refer to the following:
To build the service and execute unit tests, ensure you have the following:
- Java 21
- Maven
- Git
In this section, we will enhance the specification file to encompass:
- API Endpoint
- Comprehensive Parameter Description (Header, Query, and Path)
- Exemplary Dataset
Upon finalization of the controller code, integration testing, such as with Postman, can commence.
Steps:
- Utilize the model class as a foundation for creating the DAO.
- Within the service class, establish values for any read-only fields.
- Author unit and integration tests (MongoDB)
- Integrate the controller to utilize the service.
- Following approval and compilation of this code, testers can commence testing for the functionality.
Service should do any business or database checks. If a resource request is not found then a 404 error is returned
A business validation error will throw an exception that will be handled in the application ControllerAdvice class and a HTTP Bad request is returned with an Errors object from the CH standard Errors class.
To set up and build the service using Docker, follow these steps:
- Clone Docker CHS Development repository and follow instructions in the README.
- Execute the following:
./bin/chs-dev services enable accounts-user-api
./bin/chs-dev development enable accounts-user-api
- Ensure you're using Java 21
- Start Docker using
tilt up
in the docker-chs-development directory. - Open the tilt window and wait for
accounts-user-api
to become green. - Open your browser and navigate to http://api.chs.local/users/healthcheck.
Note: These instructions are tailored for a local Docker environment.
For further details, please refer to the documentation and associated resources.