3
0

add(codegen): docs codegen for all

This commit is contained in:
Tit Petric
2018-11-05 13:37:18 +01:00
parent fdf24b3e2c
commit d1fba3b3b1
5 changed files with 162 additions and 1 deletions

View File

@@ -52,6 +52,7 @@ if (getenv("DEBUG") === "true") {
$api_files = glob($project . "/docs/src/spec/*.json");
$apis = array_map(function($filename) {
$api = array_change_key_case_recursive(json_decode(file_get_contents($filename), true));
$api['entrypoint'] = strtolower($api['interface']);
if (empty($api['parameters'])) {
$api['parameters'] = array();
}
@@ -71,7 +72,7 @@ $apis = array_map(function($filename) {
}, $api_files);
usort($apis, function($a, $b) {
return strcmp($a['interface'], $b['interface']);
return strcmp($a['entrypoint'], $b['entrypoint']);
});
$parsers = array(