added function renderApi(appName) which can be used from commandline
This commit is contained in:
parent
66e35b7704
commit
e8e2c7098a
1 changed files with 18 additions and 2 deletions
|
@ -1,10 +1,26 @@
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* of no use, just to avoid error message
|
* renders the api of a given application. used from commandline.
|
||||||
*/
|
*/
|
||||||
function onRequest () {
|
function renderApi(appName) {
|
||||||
|
|
||||||
|
// supress security checks when accessing actions
|
||||||
|
res.data.noWeb = true;
|
||||||
|
|
||||||
|
// start the application
|
||||||
|
this.startApplication(appName);
|
||||||
|
var appObj = this.getApp(appName);
|
||||||
|
var docApp = appObj.getChildElement("api");
|
||||||
|
|
||||||
|
// now render the api
|
||||||
|
var ct = docApp.renderApi();
|
||||||
|
writeln("rendered " + ct + " files");
|
||||||
|
|
||||||
|
// cleanup
|
||||||
|
this.stopApplication(appName);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* lists all applications in appdir.
|
* lists all applications in appdir.
|
||||||
* for active apps use this.getApplications() = helma.main.Server.getApplications()
|
* for active apps use this.getApplications() = helma.main.Server.getApplications()
|
||||||
|
|
Loading…
Add table
Reference in a new issue