Skip to content

Latest commit

 

History

History
56 lines (35 loc) · 3.29 KB

File metadata and controls

56 lines (35 loc) · 3.29 KB

Contributing to Fingerprint Server Dotnet SDK

What this is

C# SDK for the Fingerprint Server API (search/get/update/delete identification events, sealed-result decryption, webhook signature validation). The bulk of the code is auto-generated by OpenAPI Generator (csharp generator, generichost library). Do not hand-edit generated files; edit the templates or config and regenerate.

Codegen model (read this first)

Editing src/Fingerprint.ServerSdk/** directly is almost always wrong. That directory is deleted and regenerated by generate.sh. Changes belong in:

Code generation

You need openapi-generator to run code generation. There are many ways described in the website.

You can just run ./generate.sh script and it will do all the work.

To download fresh OpenAPI schema run ./sync.sh

Configuration

Project configuration is described in config.json file. To read about available parameters run the command below:

java -jar ./bin/openapi-generator-cli.jar config-help -g csharp

Running tests

We have two type of tests:

To run tests you can use IDE instruments or just run:

dotnet test

Testing the local source code of the SDK

We recommend using our docker-compose.yml file for running the project locally. To do that:

  1. Build the image used for running the project: docker build --tag fingerprint-server-dotnet-sdk:latest ./
  2. Prepare env file based on the .env.example.
  3. Run the example project: docker compose run --rm example. The --rm flag ensures the service is removed once the command completes execution.

How to publish

We use changesets for handling release notes. If there are relevant changes, please add them to changeset via pnpm exec changeset. You need to run pnpm install before doing so. After the release is created, the package is published to nuget by publish.yml workflow.