This microservice acts as a proxy service over the Dynamics 365 API provided to NOI Technology by Würth Phoenix.
This API uses the OData standard: https://docs.microsoft.com/en-us/odata/
A test installation can be found here --> https://api.community.noi.testingmachine.eu/
To build the project, the following prerequisites must be met:
Get a clone of this repository
git clone https://github.com/noi-techpark/it.bz.noi.community-api
The following environment variables are needed in ordert to get the lambda function to work:
Key | Value |
---|---|
CLIENT_ID | <CLIENT_ID provided by Würth Phoenix> |
CLIENT_SECRET | <CLIENT_SECRET provided by Würth Phoenix> |
TENANT_ID | <TENANT_ID provided by Würth Phoenix> |
SERVICE_URL | https://noitest.crm4.dynamics.com/api/data/v9.2 |
SERVICE_SCOPE | https://noitest.crm4.dynamics.com/.default |
OPENID_AUTHORITY | https://auth.opendatahub.testingmachine.eu/auth/realms/noi/ |
Question: The SERVICE_URL and SERVICE_SCOPE (...noitest...) will change in the future?
The project can be developed purely with a basic editor in combination with the dotnet CLI.
Notable commands are:
-
dotnet tool restore
: restores the CLI tools -
dotnet restore
: restores the project dependencies -
dotnet build
: run a build -
dotnet run -p ./it.bz.noi.community-api/
run the microservice
-
dotnet watch run -p ./it.bz.noi.community-api/
watch and run the microservice, if a change is detected it automatically reloads the executable
-
dotnet test
: run the tests -
dotnet watch test -p ./it.bz.noi.community-api.Tests/
: watch and run tests after a file gets modified
You can develop the app with your coding editor of your choice that supports C#. For example to code with Visual Studio Code:
- Start VS Code, e.g. by launching
code .
from the command line. - Install the
ms-dotnettools.csharp
VS Code extension for C# coding support (if not already installed). - The editor tooling should now work and you can start to code.
See how the odh-api-core
project gets deployed. The only notable difference is that the Dockerfile
and docker compose.yml
files are located at the root of the directory.
See here
This project is REUSE compliant, more information about the usage of REUSE in NOI Techpark repositories can be found here.
Since the CI for this project checks for REUSE compliance you might find it useful to use a pre-commit hook checking for REUSE compliance locally. The pre-commit-config file in the repository root is already configured to check for REUSE compliance with help of the pre-commit tool.
Install the tool by running:
pip install pre-commit
Then install the pre-commit hook via the config file by running:
pre-commit install