Skip to content

Latest commit

 

History

History
39 lines (24 loc) · 1.89 KB

contributing.md

File metadata and controls

39 lines (24 loc) · 1.89 KB

Contributing to Fingerprint Pro Server API SDK

Structure

Most files in the project are autogenerated by openapi-generator for java.

  • template - folder contains redefined templates of openapi-generator. For generating original templates, you can run this command: java -jar ./bin/generator.jar author template -g java --library jersey2
  • docs - generated documentation for models and API Client.
  • src - API Client code is generated automatically.

Code generation

You need openapi-generator to run code generation. There are many ways described in the readme. In the project we use local jar file bin/generator.jar.

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

To download fresh OpenAPI schema run sh ./scripts/sync.sh

Testing the local source code of the SDK

Use the ./src/examples/java/com/fingerprint/example/FunctionalTests.java file to make API requests using the local version of the SDK.

  1. Make sure you have Java Development Kit v17 installed (v20 does not currently work).
  2. Create an .env file in the root folder according to .env.example with your API key and test variables.
  3. Finally, run ./gradlew runFunctionalTests.

Configuration

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

java -jar ./bin/generator.jar config-help -l java

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.