The Mock Data Holder (Java) is a reference implementation of a CDR Data Holder solution, designed to support the Consumer Data Right (CDR) implementation journey. It aims to assist CDR participants in developing their own Data Holder (DH) systems that comply with Consumer Data Standards.
The Data Standards Body provides a docker image in the DockerHub. You can run the image on your computer to get a running instance of the Mock Data Holder (Java) without the need for a local setup. For more information, refer to the Quick Start with Docker section below.
You can also set up a local instance of this project for customised and extended use cases. For more information, refer to the Local Setup and Customisation section below.
To interact with and explore CDR APIs of the Mock Data Holder, you can use our comprehensive Postman collection. Please refer to the Using Postman to call the Data holder APIs section below for details.
This solution:
- is maintained regularly to ensure compatibility with the latest Consumer Data Standards.
- assists Data Holders with regulatory adherence through accurate request and response simulations.
- provides Docker Support to simplify deployment and testing across various environments, with ready-to-use Docker images available on DockerHub, eliminating the need for local builds.
- provides ORM (JPA) support with H2 database to demonstrate an end-to-end API endpoint implementation.
- strictly follows the CDS Guidelines for handling the request and response HTTP headers accurately.
- utilises test data generated by the Test Data CLI Tool for populating the database to mimic various real-world scenarios for thorough testing.
-
Run the image from DockerHub:
docker run -p 8383:8383 consumerdatastandardsaustralia/mock-data-holder-java:x.x.x
or, if you want to point to your own keystore:
docker run -p 8383:8383 -v /your/local/path/to/mock-data-holder-java/keystore:/keystore consumerdatastandardsaustralia/mock-data-holder-java:x.x.x
-
If you want to pass a test data file to be loaded at start up:
docker run -p 8383:8383 -v /your/local/path/to/testdata-cli/samples/output/u1-output.json:/testdata/u1-output.json consumerdatastandardsaustralia/mock-data-holder-java:x.x.x file:///testdata/u1-output.json
or
docker run -p 8383:8383 -v /your/local/path/to/testdata-cli/samples/output/u1-output.json:/testdata/u1-output.json consumerdatastandardsaustralia/mock-data-holder-java:x.x.x https://some.web.server/testdata/u1-output.json
Where
x.x.x
is the version, say,2.6.0
-
Run locally-built image:
docker run -p 8383:8383 consumerdatastandardsaustralia/mock-data-holder-java:2.6.1-SNAPSHOT
Before you begin, ensure you have the following installed:
- Git, for cloning the repository.
- Java 8 (JDK 1.8)
- Maven 3
-
Create a fork of this repository. To do this, click the Fork button in the top right corner of the GitHub repository home page.
-
After forking the repository, clone it to your local machine. You can do this by running the following command in your terminal or command prompt:
git clone https://github.com/your-username/project-name.git
Replace
your-username
with your GitHub username andproject-name
with the name of your repository. -
Once the repository is cloned, navigate to the project directory by running:
cd project-name
Replace
project-name
with the name of the repository.
- Customise the project as needed for your specific use case.
- Navigate to the project directory and execute the following command:
mvn install
-
Start the development server by running the following command in the project directory:
mvn spring-boot:run
or
java -jar target/mock-data-holder-java-x.x.x.jar
Where
x.x.x
is the version, say,2.6.0
The data will be loaded from the payloads directory.
If you want to pass a test data file to be loaded at start up:
java -jar target/mock-data-holder-java-x.x.x.jar /your/local/path/to/testdata-cli/samples/output/u1-output.json
-
Open your web browser and navigate to http://localhost:8383 to access the Mock Data Holder (Java) application. You should be able to see the Swagger UI page.
We welcome contributions from the community! If you'd like to contribute to this project, please follow these simple steps:
-
Create a new branch for your work from the
master
branch:git checkout -b feature/your-feature-name
-
Begin making your changes or contributions.
-
Follow the instructions in the project repository to run and test your changes locally.
-
Commit your changes with clear and concise commit messages.
-
Push your changes to your forked repository.
-
Open a pull request (PR) using the dev branch in the original repository as the destination branch. Include a detailed description of your changes and the problem you are addressing.
-
Engage in the discussion on your PR and make any necessary adjustments based on feedback from maintainers and other contributors.
-
Once your PR is approved and all tests pass, it will be merged into the project.
- Please ensure your contributions align with our project's objectives and guidelines.
Our Postman collection includes pre-configured environments and requests that mirror typical interactions with our Mock Data Holder's APIs, and allows us to test functionality, response formats, and error handling seamlessly.
For comprehensive guides, installation instructions, usage tutorials, and more, please visit this article on Zendesk.
Encountered an issue? We're here to help. Please visit our issue reporting guidelines for submitting an issue.
Join our newsletter to receive the latest updates, release notes, and alerts. Subscribe here.
The artefact is released under the MIT License, which allows the community to use and modify it freely.
The artefacts in this repository are offered without warranty or liability, in accordance with the MIT licence.
The Data Standards Body (DSB) develops these artefacts in the course of its work, in order to perform quality assurance on the Australian Consumer Data Right Standards (Data Standards).
The DSB makes this repository, and its artefacts, public on a non-commercial basis in the interest of supporting the participants in the CDR ecosystem.
The resources of the DSB are primarily directed towards assisting the Data Standards Chair for developing the Data Standards.
Consequently, the development work provided on the artefacts in this repository is on a best-effort basis, and the DSB acknowledges the use of these tools alone is not sufficient for, nor should they be relied upon with respect to accreditation, conformance, or compliance purposes.