Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
API_VIEWER_FILES= \
api-viewer/apidata.js \
api-viewer/PVEAPI.js \
- /usr/share/javascript/proxmox-widget-toolkit-dev/APIVIEWER.js
+ /usr/share/javascript/proxmox-widget-toolkit-dev/APIViewer.js
API_VIEWER_SOURCES= \
api-viewer/index.html \
-var clicmdhash = {
+let method2cmd = {
GET: 'get',
POST: 'create',
PUT: 'set',
DELETE: 'delete'
};
-function cliusage(method, path) {
- return `<tr><td> </td></td><tr><td>CLI:</td><td>pvesh ${clicmdhash[method]} ${path}</td></tr></table>`;
+function cliUsageRenderer(method, path) {
+ return `<tr><td> </td></td><tr><td>CLI:</td><td>pvesh ${method2cmd[method]} ${path}</td></tr></table>`;
}
my $tree = PVE::RESTHandler::api_dump_remove_refs(PVE::RESTHandler::api_dump('PVE::API2'));
-print "var pmxapi = " . to_json($tree, {pretty => 1, canonical => 1}) . ";\n\n";
+print "const apiSchema = " . to_json($tree, {pretty => 1, canonical => 1}) . ";\n\n";
exit(0);