1. Go to this page and download the library: Download goez/drafter-php library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
goez / drafter-php example snippets
$version = $drafter
->version()
->run();
// Reset options on the command
$drafter->resetOptions();
$drafter
->input('your-service.apib')
->format('yaml') // optional as yaml is the default
->output('your-service.ast.yml')
->run();
$process = $drafter
->input('your-service.apib')
->format('json')
->output('your-service.refract.json')
->build();
// do stuff with the process
$drafter
->run($process);
bash
$ composer
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.