PHP code example of thiagoarioli / yii2-rest-doc-slade-version
1. Go to this page and download the library: Download thiagoarioli/yii2-rest-doc-slade-version 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/ */
thiagoarioli / yii2-rest-doc-slade-version example snippets
/**
* My model.
*
* @property string $title Model's title
*/
/**
* @restdoc-field int $id ID
* @restdoc-field string $title Model's title
*/
php
'controllerMap' => [
'build-rest-doc' => [
'sourceDirs' => [
'@api/modules/v1/controllers', // <-- path to your API controllers
],
'template' => '//restdoc/slate.php',
'class' => '\thiagoarioli\restdoc\controllers\BuildController',
'targetFile' => '@console/slate/source/index.html.md',
'on afterAction' => function() {
exec("bundle exec middleman build");
}
],
]