loopback-explorer should pick up `hideRemoteMethod` called after the explorer was initialized

Created on 23 Oct 2014  路  6Comments  路  Source: strongloop/loopback

// works, User.login is hidden
User.disableRemoteMethod('login', true);
app.use(explorer(app, { basePath: '/' }));

// does not work, User.login is shown in the UI
app.use(explorer(app, { basePath: '/' }));
User.disableRemoteMethod('login', true);

See also https://github.com/strongloop/loopback-explorer/pull/22, strongloop/loopback#402 and https://github.com/strongloop/loopback/issues/651

feature

Most helpful comment

Released in [email protected] and [email protected]. Enjoy :)

All 6 comments

@bajtos Let me take this. (Anyway, I'm a beginner to this community. If I do something wrong, please advise.)

I'll send one PR to this repo to make Loopback emits 'remoteMethodDisabled' event and one PR to loopback-component-explorer to re-create the swagger object when this event fired.

I'll send one PR to this repo to make Loopback emits 'remoteMethodDisabled' event and one PR to loopback-component-explorer to re-create the swagger object when this event fired.

Awesome, thank you for the contribution. I can see the first pull request was already landed :)

Released in [email protected] and [email protected]. Enjoy :)

@bajtos In loopback-component-explorer, should we change the loopback version in devDependency to be "^2.28.0" to make it more explicit about minimum requirement?

In loopback-component-explorer, should we change the loopback version in devDependency to be "^2.28.0" to make it more explicit about minimum requirement?

That's a good idea, could you please contribute that change yourself?

I am closing this issue as resolved.

@bajtos Done. I made a PR at strongloop/loopback-component-explorer#159.

Was this page helpful?
0 / 5 - 0 ratings