services/swagger.js
function isBlueoakProject() {
    if ((path.basename(global.__appDir) !== 'server')) {
        return false;
    }
    try {
        return fs.statSync(path.resolve(global.__appDir, '../common/swagger')).isDirectory();
    } catch (err) {
        return false;
    }
}
function isBlueoakProject() {
    if ((path.basename(global.__appDir) !== 'server')) {
        return false;
    }
    try {
        return fs.statSync(path.resolve(global.__appDir, '../common/swagger')).isDirectory();
    } catch (err) {
        return false;
    }
}
function isBlueoakProject ( ) { if ( ( path . basename ( global . __appDir ) !== 'server' ) ) { return false ; } try { return fs . statSync ( path . resolve ( global . __appDir , '../common/swagger' ) ) . isDirectory ( ) ; } catch ( err ) { return false ; } }
There are two possible places for loading swagger. If we're part of a broader blueoak client-server project, blueoak is running from a 'server' directory, and there's a sibling directory named 'common' which contains the swagger directory. Otherwise we just look in the normal swagger folder within the project
There are two possible places for loading swagger . If we re part of a broader blueoak client - server project blueoak is running from a server directory and there s a sibling directory named common which contains the swagger directory . Otherwise we just look in the normal swagger folder within the project