loopbackio / loopbackio/loopback-next
Adding custom keyword through ajv "unique" , need to access repository.
Open
Nobody has claimed this yet.
bug
- Dominant language
- TypeScript
- Stars
- 5.1k
- Forks
- 1.1k
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 27
Description
Describe the bug
I am adding custom keyword "unique" in loopback 4. It will check whether the entered value is present in db or not.
How can I access repository or request context in "unique" keyword definition or validation.
Logs
No response
Additional information
No response
Reproduction
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
Start with the AJV async-validation guide linked in the reproduction and the custom "unique" keyword described in the issue. Determine whether repository or request-context access is supported during LoopBack validation, then document the supported approach and its limitations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- node.js, 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
- 20/100