]> git.proxmox.com Git - pve-docs.git/blobdiff - api-viewer/PVEAPI.js
Precise certificate generation
[pve-docs.git] / api-viewer / PVEAPI.js
index 409214dd4b9fe7618c71025a1181e7c6de8d0c56..1c34ef2e850deca859d107e2644bf582cf42fdf5 100644 (file)
@@ -189,14 +189,27 @@ Ext.onReady(function() {
 
                if (info.returns) {
 
-                   var rtype = info.returns.type;
-                   if (!rtype && info.returns.items)
+                   var retinf = info.returns;
+                   var rtype = retinf.type;
+                   if (!rtype && retinf.items)
                        rtype = 'array';
                    if (!rtype)
                        rtype = 'object';
 
+                   var returnhtml;
+                   if (retinf.items) {
+                       returnhtml = '<pre>items: ' + Ext.htmlEncode(JSON.stringify(retinf.items, null, 4)) + '</pre>';
+                   }
+
+                   if (retinf.properties) {
+                       returnhtml = returnhtml || '';
+                       returnhtml += '<pre>properties:' + Ext.htmlEncode(JSON.stringify(retinf.properties, null, 4));
+                   }
+
                    sections.push({
-                       title: 'Returns: ' + rtype
+                       title: 'Returns: ' + rtype,
+                       bodyPadding: 10,
+                       html: returnhtml
                    });
                }