@@ -62,8 +62,8 @@ breaking effects on ongoing consumers. See also <<193>>.
62
62
63
63
During the deprecation phase, the producer should add a `Deprecation: <date-time>`
64
64
(see https://tools.ietf.org/html/draft-ietf-httpapi-deprecation-header[draft: RFC
65
- Deprecation HTTP Header]) and - if also planned - a `Sunset: <date-time>` (see
66
- {RFC-8594}#section-3[RFC 8594]) header on each response affected by a
65
+ Deprecation HTTP Header Field ]) and - if also planned - a `Sunset: <date-time>`
66
+ (see {RFC-8594}#section-3[RFC 8594]) header on each response affected by a
67
67
deprecated element (see <<187>>).
68
68
69
69
The {Deprecation} header can either be set to `true` - if a feature is retired
@@ -81,17 +81,35 @@ Sunset: Wed, 31 Dec 2025 23:59:59 GMT
81
81
82
82
If multiple elements are deprecated the {Deprecation} and {Sunset} headers are
83
83
expected to be set to the earliest time stamp to reflect the shortest interval
84
- consumers are expected to get active.
84
+ at which consumers are expected to get active. The {Deprecation} and {Sunset}
85
+ headers can be defined as follows in the API specification (see also the
86
+ default definition below):
87
+
88
+ [source,yaml]
89
+ ----
90
+ components:
91
+ parameters|headers:
92
+ Deprecation:
93
+ $ref: 'https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml#/Deprecation'
94
+ Sunset:
95
+ $ref: 'https://opensource.zalando.com/restful-api-guidelines/models/headers-1.0.0.yaml#/Sunset'
96
+ ----
97
+
98
+ [source,yaml]
99
+ ----
100
+ include::../includes/deprecation.yaml[]
101
+ include::../includes/sunset.yaml[lines=3..-1]
102
+ ----
85
103
86
104
*Note:* adding the {Deprecation} and {Sunset} header is not sufficient to gain
87
105
client consent to shut down an API or feature.
88
106
89
- *Hint:* In earlier guideline versions, we used the ` Warning` header to provide
90
- the deprecation info to clients. However, ` Warning` header has a less specific
107
+ *Hint:* In earlier guideline versions, we used the { Warning} header to provide
108
+ the deprecation info to clients. However, { Warning} header has a less specific
91
109
semantics, will be obsolete with
92
110
https://tools.ietf.org/html/draft-ietf-httpbis-cache-06[draft: RFC HTTP
93
- Caching], and our syntax was not compliant with {RFC-7234}#page-29 [RFC 7234
94
- -- Warning header ].
111
+ Caching], and our syntax was not compliant with {RFC-9111}#section-5.5 [RFC 9111
112
+ Section 5.5 "Warning" ].
95
113
96
114
97
115
[#190]
@@ -105,6 +123,7 @@ ensure alignment with service owners on required migration task.
105
123
*Hint:* In earlier guideline versions, we used the `Warning` header to provide
106
124
the deprecation info (see hint in <<189>>).
107
125
126
+
108
127
[#191]
109
128
== {MUST} not start using deprecated APIs
110
129
0 commit comments