loopbackio / loopbackio/loopback-next

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

Open
#8,090 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature REST
Dominant language
TypeScript
Stars
5.1k
Forks
1.1k
Avg merge
2d 21h
Merged PRs (30d)
27

Description

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. :)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with packages/rest/src/rest.application.ts around line 94, the location linked in the issue. Clarify the desired independent extension behavior for RestApplication and RestComponent, then identify the project tests covering these classes; done should provide a supported alternative to copying the entire RestApplication class.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
api, backend-api-design
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.