Open allenjzhang opened 3 months ago
Once this is fixed, fixing spec:
/workspaces/azure-rest-api-specs-pr/specification/workloads/Workloads.SAPVirtualInstance.Management/custom.tsp
@allenjzhang @armVirtualResource
is not designed to be an endpoint, but a parent to a resource (i.e. in places where there is an additional path segment). Actions should occur only on resources or providers, according to the RPC.
We should not provide core template support for patterns that are outside the RPC. If we need to aupply a pattern for this, why not imply use primitive operations using @route
?
Describe the bug
Cases exists where @armVirtualResource having actions. Standard ArmResourceXXX op template does strict resource base type check. In this case we should allow virtual resource as well so it can take advantage of standard template.
Proposal:
Loosen the contraint check ONLY on
ArmResourceActionXXX
. For other life cycle operations, virtual resource doesn't make sense.Reproduction
Checklist