Azure / Azure/azure-rest-api-specs

[Storage] Delete Blob API responds not include header "x-ms-delete-type-permanent", which is not aligned with rest API doc

Open
#24,927 1 comment 0 reactions 0 assignees View on GitHub
Service Attention Storage
Dominant language
TypeSpec
Stars
3.1k
Forks
5.9k
Avg merge
3d 37m
Merged PRs (30d)
446

Description

In [Rest API doc](https://learn.microsoft.com/en-us/rest/api/storageservices/delete-blob?tabs=azure-ad#response-headers), Delete Blob API responds will have "x-ms-delete-type-permanent" header for version 2017-07-29 and later.
Per my test, server will also return this header after 2017-07-29, no matter the account enable/disable soft delete.

But in [storage swagger](https://github.com/Azure/azure-rest-api-specs/blob/4a4fcbb05758711473d337c48541d75ef9283fe3/specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-12-02/blob.json#L3624C25-L3624C36), the delete blob API responds not define the header "x-ms-delete-type-permanent".
This is not aligned with rest API doc and server behavior.

Currently , Azurite (storage rest API emulator) API is generated from swagger, since in swagger Delete Blob API responds not include header "x-ms-delete-type-permanent", Azurite also won't return it.
But Azure Storage Rust SDK is expecting the x-ms-deleted-type-permanent header and fails when this header is missing in the Azureite response.
So the swagger issue caused Azure Storage Rust SDK failed on Azurite. See https://github.com/Azure/Azurite/issues/2061/

Please fix swagger by adding the header to make it aligned with server behavior and rest API doc.

Contributor guide

Open the contributing guide

Research direction

Start at specification/storage/data-plane/Microsoft.BlobStorage/preview/2021-12-02/blob.json around the Delete Blob response near line 3624. Compare its response headers with the linked REST API documentation and the reported server behavior. Done means the specification accurately declares x-ms-delete-type-permanent for the applicable API version.

Written by the indexing model from the issue text.

Assessment

Tech stack
openapi
Domain
api
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
55/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.