Update spec to remove requirement that resource be returned during deletion. - #381
Update spec to remove requirement that resource be returned during deletion.#381Kyle Albert (kalbert312) wants to merge 2 commits into
Conversation
… operation result.
There was a problem hiding this comment.
Pull request overview
This PR updates the v2 extensibility contract/spec so that deleteResource no longer returns the deleted Resource on synchronous completion, aligning delete semantics with “no content” responses.
Changes:
- Updated
deleteResourcereturn types in the core and HTTP TypeSpec definitions to removeResourcefrom the synchronous delete response. - Updated contract documentation and regenerated OpenAPI to drop the 200/Resource response for delete.
- Adjusted TypeSpec emitter config formatting in
tspconfig.yaml.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| spec/tspconfig.yaml | Maintains OpenAPI emitter configuration (formatting/indentation change). |
| spec/http.tsp | Updates HTTP-level delete operation to return NoContent/Accepted rather than Ok<Resource>. |
| spec/core.tsp | Introduces a delete-specific result alias (EmptyOrLroResult) and updates core deleteResource signature accordingly. |
| docs/contract/v2/openapi.yaml | Removes the 200/Resource response from the generated OpenAPI delete operation. |
| docs/contract/contract.md | Updates the human-readable contract to reflect “empty content” delete results. |
Comments suppressed due to low confidence (1)
docs/contract/v2/openapi.yaml:218
- The 200 response has been removed for deleteResource, but the operation description still claims it can return "200 OK with a Resource" and mentions the RELO pattern. This makes the OpenAPI contract internally inconsistent; update the source TypeSpec docs and re-generate this file (or update the description here) so the described status codes match the responses section.
'202':
description: Standard 202 Accepted response for long-running operations.
headers:
x-ms-request-id:
required: true
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #381 +/- ##
=======================================
Coverage 53.56% 53.56%
=======================================
Files 108 108
Lines 2162 2162
Branches 241 241
=======================================
Hits 1158 1158
Misses 950 950
Partials 54 54 🚀 New features to boost your workflow:
|
| | | Type | | ||
| |------------|-------------------------------------------------| | ||
| | **Input** | `ResourceReference` | | ||
| | **Output** | `void \| LongRunningOperation \| ErrorResponse` | |
There was a problem hiding this comment.
We may need to make this nullable Resource - when the deletion is async the extension can choose to use the status property to report progress in case their API does not support LongRunningOperation.
No description provided.