Adding an endpoint
Sometimes API endpoints that you might need are missing. To add those, first you need to add them to LabraCore. Then, you update the API spec in LabraDoor. To do this, you need to run
curl http://localhost:8082/api-docs > oa-spec-labracore.json
in the LabraDoor directory. Make sure LabraCore is running. To access these changes you can publish LabraDoor locally:
LABRADOOR=... # Insert location here
cd $LABRADOOR
./gradlew clean
./gradlew build -x test
./gradlew publishToMavenLocal
Using the new changes locally
Once you publish the artifact to your local maven repository. To use it in other projects, simply run
./gradlew build --refresh-dependencies
If this doesn't work, most IDEs that have gradle support will come with a sync feature.
Publishing your changes
Once your changes are merged to the LabraCore and LabraDoor development branch a new snapshot version or LabraDoor should be created. This is done using ./gradlew publish
instead of ./gradlew publishToMavenLocal
. You can use a personal access token to authenticate yourself. Before doing this update the version in the build.gradle
file.
When changes are merged to master or development, deploying a new version is done automatically, but the version does still need to be changed.