Blame view

scripts/apiDoc.php 486 Bytes
ff01af8d   Nathanaël Jourdane   Add script to gen...
1
2
3
4
<?php
require_once dirname(__FILE__) . '/../php/config.php';

$restFolderPath = AMDA_IHM . "php/rest";
e2d7887b   Benjamin Renard   Fix apiDoc install
5
6
$apidocConfigTemplateFile = $restFolderPath . "/apidoc.json.template";
$apidocConfigFile = $restFolderPath . "/apidoc.json";
ff01af8d   Nathanaël Jourdane   Add script to gen...
7

e2d7887b   Benjamin Renard   Fix apiDoc install
8
9
$apidocConfig = str_replace("{:REST_API_URL:}", REST_API_URL, file_get_contents($apidocConfigTemplateFile));
file_put_contents($apidocConfigFile, $apidocConfig);
ff01af8d   Nathanaël Jourdane   Add script to gen...
10

e2d7887b   Benjamin Renard   Fix apiDoc install
11
echo exec("apidoc -v -c $apidocConfigFile -i $restFolderPath -o " . API_DOC_PATH).PHP_EOL;
ff01af8d   Nathanaël Jourdane   Add script to gen...
12
?>