A rule written with `Require.filter` inside a contract group keyed `data`, `params` or `softCheck` loses its data type
Nobody has claimed this yet.
Assessment
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Newbie friendliness
- 48/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- typescript
- Domain
- backend-api-design
Research direction
Start with src/services/serviceContract.ts, especially RuleData and the group types, and trace how inline Require.filter rules are typed in groups keyed data, params, or softCheck. Compare that with a group using another key and with the authorizer restriction. Decide whether those keys should be refused or the type should be corrected; done means the behavior is resolved and the rule's data type is checked.
Written by the indexing model from the issue text.
Description
A contract group may be keyed data, params or softCheck, since those keys are only told from a part of an entry by what is inside them. In such a group, an entry whose rule is written in place as Require.filter(() => ({ id: 1 })) has its data type become any, so what the operation hands the rule is not checked. In a group with another key the same rule keeps its type.
No contract keys a group so today. The question is whether those three keys should be refused for groups, as authorizer is, or the type should be mended.
Found in the review of #1189, and it is the same before it.
Where: src/services/serviceContract.ts (RuleData, the group types).
- Dominant language
- TypeScript
- Stars
- 11
- Forks
- 2
- PR merge metrics
- No merged PRs in 30d
Getting set up
Starts the project's dev container in your browser, under your own GitHub account.
- Ships a Dockerfile or Docker Compose file
- No pull request template
- No contributing 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.
More from vevcom/project-next
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
vevcom/project-next#1223 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
vevcom/project-next#1220 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
vevcom/project-next#1217 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
vevcom/project-next#1214 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
vevcom/project-next#1213 ·
All issues in vevcom/project-next
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
agilepathway/label-checker#1015 · 2 comments ·
Maintainers usually reply within 1 day
-
tech-debt
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
Maintainers usually reply within 1 day
-
bug P3
Difficulty 1/5 Under an hour Newbie friendliness 89/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
react-component/image#541 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Maintainers usually reply within 1 day