loopback-next icon indicating copy to clipboard operation
loopback-next copied to clipboard

Cant smoothly extend RestApplication without being stuck with RestComponent as well.

Open roberttaylortech opened this issue 2 years ago • 1 comments

https://github.com/loopbackio/loopback-next/blob/2661354cb67560be32558f118fbd9164167c8d86/packages/rest/src/rest.application.ts#L94

Wanting to extend RestApplication to override one or another method and I'd also like to extend RestComponent and override a thing or two. Not really seeing a way to do it with the way this is coded. There are a bunch of patterns that could rectify this. Instead I'm having to entirely copy the RestApplication class to achieve this.

Noting. Will add more detail shortly. :)

roberttaylortech avatar Nov 26 '21 02:11 roberttaylortech

Thanks for opening a new issue, @roberttaylortech! I've not encountered the need to provide my own RestComponent, so I'm not aware of any existing way to do so, but I do believe this is something LoopBack 4 should support as part of its extensibility principles.

Noting. Will add more detail shortly. :)

I look forward to the additional details :-)

achrinza avatar Nov 26 '21 06:11 achrinza