Blame view

scripts/apiDoc.php 456 Bytes
ff01af8d   NathanaĆ«l Jourdane   Add script to gen...
1
2
3
4
5
6
7
8
9
10
11
12
<?php
require_once dirname(__FILE__) . '/../php/config.php';

$restFolderPath = AMDA_IHM . "php/rest";
$apidocConfigFile = $restFolderPath . "apidoc.json";
$tempConfigFile = tempnam(sys_get_temp_dir(), 'apidoc.json');

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

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