apiDoc.php 486 Bytes
<?php
require_once dirname(__FILE__) . '/../php/config.php';

$restFolderPath = AMDA_IHM . "php/rest";
$apidocConfigTemplateFile = $restFolderPath . "/apidoc.json.template";
$apidocConfigFile = $restFolderPath . "/apidoc.json";

$apidocConfig = str_replace("{:REST_API_URL:}", REST_API_URL, file_get_contents($apidocConfigTemplateFile));
file_put_contents($apidocConfigFile, $apidocConfig);

echo exec("apidoc -v -c $apidocConfigFile -i $restFolderPath -o " . API_DOC_PATH).PHP_EOL;
?>