The recommended flow for setting up the development machine for the sake of modifying the reference implementation is to:
- Set up a GitHub Personal Access Token as mentioned here.
- Clone DCSA-Edocumentation (with
--recurse-submodules
option.) - Set up a database via:
docker compose up -d -V --build dcsa-test-db
- Build once using
mvn package
- This step will hopefully be obsolete in the future.
- Have IDEA run the
Application.class
as a spring boot application with the following profiles active:dev,localdb,logsql,nosecurity
- If you have the community edition of IDEA, set the
SPRING_PROFILES_ACTIVE
environment variable todev,localdb,logsql,nosecurity
.
- If you have the community edition of IDEA, set the
- Verify if the application is running:
curl http://localhost:9090/actuator/health
- Run the test suite via
newman run postman_collection.json
You will often need to reset your database, which can be done by:
- Stop the application
- Run
docker compose down
- Run
docker compose up -d -V --build dcsa-test-db
- Start the application again.
We do not offer migration from previous versions of the database. Any change that changes the SQL will require a reset of the database.
As a non-DCSA developer wanting to use / test the reference implementation, the recommended flow is:
- Set up a GitHub Personal Access Token as mentioned here.
- Clone DCSA-Edocumentation (with
--recurse-submodules
option.) - Build the application using
mvn package
- Set up the reference implementation via:
docker compose up -d -V --build
- Note that
docker compose
by default does not load the test data (the sql files marked as test). For that, you will have to run thedocker compose
with the environment variableSPRING_PROFILES_ACTIVE=nosecurity,loadtestdata
(nosecurity
is the default if you do not set this variable). At the moment, this step is required if you want the postman collection tests to succeed.
- Note that
- Verify if the application is running:
curl http://localhost:9090/actuator/health
- If test data was loaded (see step 4), you can now run the postman tests with
newman run postman_collection.json
You are also welcome to use the DCSA developer flow, which should also work for this purpose.
This reference implementation does not do any authentication/authorization and should not be used in production as is. Using this as is in production would expose data for all parties to all other parties without checking whether they should have access.
DCSA maintains a number of integration tests in the postman_collection.json. While they have dependencies on data loading, they may be useful as a starting point of other parties that are implementing the standard. The tests are expected to work out of the box on the reference implementation itself.
The tests may be useful to others as a starting point, but you may need to edit the payloads to work with your specific test data.
The tests can either be imported in to postman or run via newman newman run postman_collection.json
.
master
is the main development branch.
pre-release
and release
are tagged and should be used as a stable version.
Development continues on master
and feature branches are created based on master
.
A typical development flow would look like:
- Create a feature branch with
master
as base, proceed to make changes to feature branch. - Raise PR against
master
. When a PR is raised against master a CI is run to ensure everything is fine. - Merge with
master
after approval by at least one verified code owner and successful CI run.
Note: If changes are required in the
DCSA-Shared-Kernel
, those changes should first be merged into the respectivemaster
branches before continuing development in this repository.
- If development has been completed as per requirements for a given API version,
master
must be tagged to
create arelease
orpre-release
accordingly.
When bug fixes are required or changes in pre-release versions are needed, we branch off using the respective
tags and continue development on that branch. It is important to note that these changes must be cherry-picked
and included into master
.