Skip to content

Latest commit

 

History

History
36 lines (23 loc) · 1.61 KB

contributing.md

File metadata and controls

36 lines (23 loc) · 1.61 KB

Contributing to Fingerprint Pro Server API SDK

Structure

Most files in the project are autogenerated by swagger-codegen for php.

  • template - folder contains redefined templates of swagger-codegen. Original templates you can find in swagger-codegen repo.
  • docs - generated documentation for models and API Client.
  • src - API Client code is generated automatically.

Code generation

You need swagger-codegen to run code generation. There are many ways described in the readme. In the project we use local jar file bin/swagger-codegen-cli.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 run_checks.php file to make API requests using the local version of the SDK.

  1. Make sure you have php installed.
  2. Make sure you have composer installed.
  3. Run composer install to install dependencies.
  4. Create an .env file in the root folder according to .env.example with your API key and test variables.
  5. Finally, run php run_checks.php.

Configuration

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

java -jar ./bin/swagger-codegen-cli.jar config-help -l php