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.
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
Use the run_checks.php
file to make API requests using the local version of the SDK.
- Make sure you have
php
installed. - Make sure you have
composer
installed. - Run
composer install
to install dependencies. - Create an
.env
file in the root folder according to .env.example with your API key and test variables. - Finally, run
php run_checks.php
.
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