Consider add @Private.enforceConstraint(Resource, Foundations.Resource) to the legacy operations
Open
feature
lib:azure-resource-manager
- Dominant language
- TypeScript
- Stars
- 27
- Forks
- 90
- Avg merge
- 1d 22h
- Merged PRs (30d)
- 156
Description
If we don't have such constraint, users could pass in any model into the operation. Even the models not marked as resource or customResource can be passed in. As a consequence, resolveArmResources cannot resolve correct results. This will confuse customers.
Contributor guide
Research direction
Locate the legacy operations and the resolveArmResources entry point, then inspect how @Private.enforceConstraint is applied to resource models. Add the stated Resource and Foundations.Resource constraint where appropriate, and verify that non-resource models are rejected while valid resources resolve correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100