loopbackio / loopbackio/loopback-next
Cache model based on schema title is flawed
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
### Describe the bug
I had a user model as a schema inside my reqbody but i need to extend the schema so i extended it using runtime creating model methods. For my surprise it was not having any effect. Only then did i figure out that you guys are caching models based on schema title. This is not intuitive. I am happy to hear what was the logic behind it ?
### Logs
```shell
```
### Additional information
_No response_
### Reproduction
https://codesandbox.io/p/sandbox/github/loopbackio/starter/tree/codesandbox
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The payload names no source file or test. Start with the provided CodeSandbox reproduction, then locate the model/schema caching path responsible for reusing a schema-title model. Done means the expected behavior for runtime model extension is agreed and covered by a regression test.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- openapi, typescript
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100