1
0
Fork 0

Fixed swagger generation as apps are no more contained in the routing table

This commit is contained in:
Michael Hackstein 2013-07-26 13:54:58 +02:00
parent a708f7d585
commit be5cda29db
1 changed files with 11 additions and 9 deletions

View File

@ -87,18 +87,20 @@
api,
ops,
foxxApp = _aal.firstExample({"mount": appname}),
app;
app,
list;
if (!foxxApp.development) {
app = _routing.firstExample({"foxxMount": foxxApp._key});
list = foxx_manager.appRoutes();
} else {
_.each(foxx_manager.developmentRoutes(), function(r) {
var ac = r.appContext;
if (ac.appId === foxxApp.app && ac.mount === foxxApp.mount) {
app = r;
return;
}
});
list = foxx_manager.developmentRoutes();
}
_.each(list, function(r) {
var ac = r.appContext;
if (ac.appId === foxxApp.app && ac.mount === foxxApp.mount) {
app = r;
return;
}
});
result.swaggerVersion = "1.1";
result.basePath = app.urlPrefix;
result.apis = apis;