Skip to content

Update spec to remove requirement that resource be returned during deletion. - #381

Open
Kyle Albert (kalbert312) wants to merge 2 commits into
mainfrom
kylea/delete-update
Open

Update spec to remove requirement that resource be returned during deletion.#381
Kyle Albert (kalbert312) wants to merge 2 commits into
mainfrom
kylea/delete-update

Conversation

@kalbert312

Copy link
Copy Markdown
Member

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 deleteResource return types in the core and HTTP TypeSpec definitions to remove Resource from 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.

Comment thread spec/http.tsp
Comment thread spec/core.tsp Outdated
@codecov

codecov Bot commented Jun 30, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 53.56%. Comparing base (1b841f1) to head (5fbb159).

Additional details and impacted files

Impacted file tree graph

@@           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:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Comment thread docs/contract/contract.md
| | Type |
|------------|-------------------------------------------------|
| **Input** | `ResourceReference` |
| **Output** | `void \| LongRunningOperation \| ErrorResponse` |

@shenglol Shenglong Li (shenglol) Jun 30, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants