You should not access `app.models` directly, all data needed for the code generator must be available via [RestClass](https://github.com/strongloop/strong-remoting/blob/87ea65685ab9ff442b7769af5e4f24fdacd1fedb/lib/rest-adapter.js#L366), [RestMethod](https://github.com/strongloop/strong-remoting/blob/87ea65685ab9ff442b7769af5e4f24fdacd1fedb/lib/rest-adapter.js#L386) and/or [SharedClass](https://github.com/strongloop/strong-remoting/blob/87ea65685ab9ff442b7769af5e4f24fdacd1fedb/lib/shared-class.js) and [SharedMethod](https://github.com/strongloop/strong-remoting/blob/87ea65685ab9ff442b7769af5e4f24fdacd1fedb/lib/shared-method.js).

```js
// not tested, just an idea
function getAllSharedCodeMethods(meta) {
  var proto = meta.sharedClass.ctor.prototype;
  return Object.keys(proto)
    .map(function(k) { return proto[k]; })
    .filter(function(m) {
      return typeof(m) == 'function' && m.sharedCode === true;
    });
} 
```

To make the implementation complete, you should support shared-code methods defined on the constructor too (e.g. `MyModel.getUrlForId(id) { /*...*/}`)