Skip to content

Commit 42e4a13

Browse files
Guidelines for 'azure-deprecating' response header
1 parent 62502e0 commit 42e4a13

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

azure/Guidelines.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
| Date | Notes |
88
| ----------- | -------------------------------------------------------------- |
9+
| 2022-Aug-20 | Add "azure-deprecating" response header |
910
| 2022-Jul-15 | Update guidance on long-running operations |
1011
| 2022-May-11 | Drop guidance on version discovery |
1112
| 2022-Mar-29 | Add guidelines about using durations |
@@ -191,6 +192,7 @@ _x-ms-request-id_ | Response | 4227cdc5-9f48-4e84-921a-10967cb785a0
191192
ETag | Response | "67ab43" (see [Conditional Requests](#Conditional-Requests))
192193
last-modified | Response | Sun, 06 Nov 1994 08:49:37 GMT
193194
_x-ms-error-code_ | Response | (see [Handling Errors](#Handling-Errors))
195+
_azure-deprecating_ | Response | (see [Deprecating Behavior](#Deprecating-Behavior))
194196
retry-after | Response | 180 (see [RFC 7231, Section 7.1.3](https://datatracker.ietf.org/doc/html/rfc7231#section-7.1.3))
195197

196198
:white_check_mark: **DO** support all headers shown in _italics_
@@ -747,6 +749,20 @@ While removing a value from an enum is a breaking change, adding value to an enu
747749

748750
> :ballot_box_with_check: **You SHOULD** use extensible enums unless you are positive that the symbol set will **NEVER** change over time.
749751
752+
### Deprecating Behavior Notification
753+
754+
When the [API Versioning](#API-Versioning) guidance above cannot be followed and the [Azure Breaking Change Reviewers](mailto:[email protected]) approve a breaking change to the operation/service, the operation/service that is being deprecated must add the `azure-deprecating` response header with a semicolon-delimited string notifying the caller what is being deprecated, when it will no longer function, and a URL linking to more information. The purpose is to inform customers (when debugging/logging responses) that they must take action to modify their call to the service's operation or their call will soon stop working entirely. It is not expected that client code will examine/parse this header's value in any way; it is purely informational to a human being.
755+
756+
:white_check_mark: **DO** add the 'azure-deprercating' header with a string value to all service operations in your service's contract file (cadl/swagger).
757+
758+
:white_check_mark: **DO** include this header in the operation's response _only if_ the operation will stop working in the future and the client _must take_ action in order for it to keep working. NOTE: We do not want to scare customers with this header.
759+
760+
:white_check_mark: **DO** make the header's value a semicolon-delimited string indicating a set of deprecations where each one indicates what is deprecating, when it is deprecating, and a URL to more information. For example:
761+
762+
```text
763+
azure-deprecating: api-version=2009-27-07 will stop working on 2022-12-01 (https://azure.microsoft.com/en-us/updates/video-analyzer-retirement);TLS 1.0 & 1.1 will stop working on 2020-10-30 (https://azure.microsoft.com/en-us/updates/azure-active-directory-registration-service-is-ending-support-for-tls-10-and-11/)
764+
```
765+
750766
### Repeatability of requests
751767

752768
The ability to retry failed requests for which a client never received a response greatly simplifies the ability to write resilient distributed applications. While HTTP designates some methods as safe and/or idempotent (and thus retryable), being able to retry other operations such as create-using-POST-to-collection is desirable.

0 commit comments

Comments
 (0)