dcsaorg / DCSA-EBL

Electronic Bill of Lading
Apache License 2.0
5 stars 4 forks source link

DCSA EBL

DCSA-EBL MASTER

Code standard

We use Google Java Style, when using IntelliJ it is recommended to download and activate the google-java-format plugin.

Building and running manually/locally

Initialize your local postgresql database as described in datamodel/README.md, then

export db_hostname=localhost
export DCSA_Version=0.7.4 #or whatever version is the right one

If running without auth0, disable it in src/main/resources/application.yaml

Then build and run with

mvn install:install-file -Dfile=../DCSA-Core/target/dcsa_core-$DCSA_Version.jar -DgroupId=org.dcsa -DartifactId=dcsa_core -Dversion=local-SNAPSHOT -Dpackaging=jar -DgeneratePom=true
mvn spring-boot:run -Ddcsa.version=local-SNAPSHOT

or using docker-compose

mvn package -Ddcsa.version=local-SNAPSHOT
docker-compose up -d -V --build

Building and running using docker-compose

To build using DCSA-core from GitHub packages

mvn package
docker-compose up -d -V --build

Branching and versioning

This repository has the following branching and versioning policy:

For example, if the latest stable version is 1.x.x the master branch will contain this 1.x.x version. Active development on 2.x.x is being done on the dev branch. When version 2.x.x is released master is tagged with version 1.x.x and the dev branch is merged into master the result is a tag-1.x.x and master containing the 2.x.x version.


Json schemas used for validation

Generated from resolved OAS Yaml file using: https://github.com/Abdiiir/openapi2schema

This will generate a tree of request/response JSON Schemas from the definitions in the OAS Yaml file.

To generate the JSON schemas follow the instructions listed in the project.

The OAS Yaml file can be downloaded at EBL OpenAPI specification.


Example of how to create a schema valiation using GET shipping-instructions endpoint as an example