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.
Editing src/Fingerprint.ServerSdk/** directly is almost always wrong. That directory is deleted and regenerated by generate.sh. Changes belong in:
- template - Mustache templates that override openapi-generator's csharp templates. These produce the API client, models, DI extensions, and the hand-authored features (
Sealed.mustache,WebhookValidation.mustache,Region.mustache). - config.json - generator config: package metadata,
targetFramework,typeMappings, and thefilesmap that routes custom template outputs (Sealed, WebhookValidation, Region, their docs) to their destinations. - res/fingerprint-server-api.yaml - the OpenAPI schema the SDK is generated from (downloaded by
sync.sh). - .openapi-generator-ignore - files the generator must NOT touch (e.g.
DateOnlyJsonConverter.cs, testModel/*, test README). - .schema-version and .openapi-generator/VERSION pin the schema and generator versions.
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
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 csharpWe have two type of tests:
- Unit tests, located in src/Fingerprint.ServerSdk.Test
- Functional tests, that use real API located in src/Fingerprint.ServerSdk.FunctionalTest
To run tests you can use IDE instruments or just run:
dotnet testWe recommend using our docker-compose.yml file for running the project locally. To do that:
- Build the image used for running the project:
docker build --tag fingerprint-server-dotnet-sdk:latest ./ - Prepare env file based on the .env.example.
- Run the example project:
docker compose run --rm example. The--rmflag ensures the service is removed once the command completes execution.
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.