Azure / Azure/typespec-azure

design discussion: typespec-azure-core support for "LRO action with no related resource pattern"

Open
#787 5 comments 0 reactions 1 assignee Claimed by @markcowl View on GitHub
design:needed
Dominant language
TypeScript
Stars
27
Forks
90
Avg merge
1d 22h
Merged PRs (30d)
156

Description

### Clear and concise description of the problem

Guideline recently added new LRO pattern [LRO action with no related resource pattern](https://github.com/microsoft/api-guidelines/blob/vNext/azure/Guidelines.md#lro-action-with-no-related-resource-pattern).

Healthinsights uses it [here](https://github.com/Azure/azure-rest-api-specs/blob/main/specification/ai/HealthInsights/HealthInsights.RadiologyInsights/route.radiologyinsights.tsp#L25) but currently with `LongRunningResourceCreateOrReplace` template in Azure.Core.

Current LroMetadata is inconsistent in this case
![image](https://github.com/Azure/typespec-azure/assets/53292327/31243747-4896-4c90-b448-62a1e4e3e152)
(The `finalResult` and `finalEnvelopeResult` is same `RadiologyInsightsJob` model. But `finalResultPath` is "result" and `finalStep` is the "result" property as well.)

We may need a new template in typespec-azure-core, e.g. `LongRunningNonResourceAction` or `LongRunningStatusMonitorCreateOrReplace`. And make sure LroMetadata gives a correct representation of the LRO process.

### Checklist

- [X] Follow our [Code of Conduct](https://github.com/azure/typespec-azure/blob/main/CODE_OF_CONDUCT.md)
- [X] Check that this issue is about the Azure libraries for typespec. For feature request in the typespec language or core libraries file it in the [TypeSpec repo](https://github.com/Microsoft/TypeSpec/issues/new/choose)
- [X] Read the [docs](https://azure.github.io/typespec-azure/).
- [X] Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.