Allow original-uri final state for POST operations and warn on missing GET#4277
Allow original-uri final state for POST operations and warn on missing GET#4277Copilot wants to merge 9 commits intorelease/april-2026from
Conversation
… GET exists at original URI
- Updated validateFinalState to allow original-uri for POST operations (in addition to PUT and PATCH)
- Added no-operation-at-original-uri diagnostic warning
- Updated createLroMetadata to emit diagnostic and treat result as void when @useFinalStateVia("original-uri") is used and no GET exists
- Added tests for PUT, PATCH, POST with original-uri and no GET
- Updated existing test for non-PUT validation
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/1902076d-04e7-43e4-bed4-faed5f55e80c
Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/1902076d-04e7-43e4-bed4-faed5f55e80c Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
…ing comment Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/1902076d-04e7-43e4-bed4-faed5f55e80c Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
markcowl
left a comment
There was a problem hiding this comment.
Add tests to typespec-azure-reseource-manager validating that
- An async provider actio0n using the standard async provider action template can use
original-urias the final state without a GET operation at the same uri as long as the appropriate rule is suppressed. Ensure that getLroMetadata returns the expected finalResult (void) - A resource action using ArmResourceActionAsync can use
original-urias the final state without a GET at the same uri as long as the appropriate rule is suppressed. Ensure that getLroMetadata returns the expected finalResult (void)
Fix any issues that you find, ensure that all tests pass and all files are correctly formatted
…sync with original-uri and no GET Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/81f1ef67-6caa-46f6-b6cc-cdc9be0b456c Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Added both tests in commit c233a24:
All 287 ARM tests and 317 azure-core tests pass. |
…/suppression tests, minimize duplication Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/c946af4e-91ff-4292-a0a2-1d7a9ef83ac9 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
markcowl
left a comment
There was a problem hiding this comment.
This looks great, one minor change. Please make sure all files are correctly formatted.
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/8bd472b1-b048-4e06-abda-365aba03ccd0 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Ran |
|
❌ There is undocummented changes. Run The following packages have changes but are not documented.
The following packages have already been documented:
Show changes
|
commit: |
|
@copilot the PR is failing the linting check. Please lint the files and fix any issues |
|
You can try these changes here
|
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/3d2c55c7-a1f5-42f6-8bb1-4fcf9e92a7c9 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
Fixed in c25be81:
|
Agent-Logs-Url: https://github.com/Azure/typespec-azure/sessions/3d2c55c7-a1f5-42f6-8bb1-4fcf9e92a7c9 Co-authored-by: markcowl <1054056+markcowl@users.noreply.github.com>
original-urifor POST operations infinal-state.tsno-operation-at-original-uriwarning diagnostic inlib.tsoriginal-urioverride inlro-helpers.tsArmResourceActionAsyncwithActionAsynctemplateArmProviderActionAsyncandActionAsynctypespec-azure-resource-managerandtypespec-client-generator-core