Skip to content

Commit bbb20ca

Browse files
committed
Define a policy for deprecation markings.
We already deprecate `example` in the Schema Object, but do not define what deprecations means. We also effectively deprecate `allowEmptyValue` in the Parameter Object but did not explictly say so. We will likely make other deprecations in the future. This defines a very basic deprecaton policy (they are still supported, but we reserve the right to define a policy for removing them in the future) and marks `allowEmptyValue` with the same formatting used for `example`.
1 parent f855d47 commit bbb20ca

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/oas.md

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,14 @@ The OpenAPI Specification is versioned using a `major`.`minor`.`patch` versionin
149149

150150
Occasionally, non-backwards compatible changes may be made in `minor` versions of the OAS where impact is believed to be low relative to the benefit provided.
151151

152+
#### Deprecation
153+
154+
Certain fields or features may be marked **Deprecated**.
155+
These fields and features remain part of the specification and can be used like any other field or feature.
156+
However, OpenAPI Description authors should use newer fields and features documented to replace the deprecated ones whenever possible.
157+
158+
At this time, such elements are expected to remain part of the OAS until the next major version, although a future minor version of this specification may define a policy for later removal of deprecated elements.
159+
152160
### Format
153161

154162
An OpenAPI Document that conforms to the OpenAPI Specification is itself a JSON object, which may be represented either in [[RFC8259|JSON]] or [[YAML|YAML]] format.
@@ -926,7 +934,7 @@ These fields MAY be used with either `content` or `schema`.
926934
| <a name="parameter-description"></a>description | `string` | A brief description of the parameter. This could contain examples of use. [CommonMark syntax](https://spec.commonmark.org/) MAY be used for rich text representation. |
927935
| <a name="parameter-required"></a>required | `boolean` | Determines whether this parameter is mandatory. If the [parameter location](#parameter-in) is `"path"`, this field is **REQUIRED** and its value MUST be `true`. Otherwise, the field MAY be included and its default value is `false`. |
928936
| <a name="parameter-deprecated"></a> deprecated | `boolean` | Specifies that a parameter is deprecated and SHOULD be transitioned out of usage. Default value is `false`. |
929-
| <a name="parameter-allow-empty-value"></a> allowEmptyValue | `boolean` | If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If [`style`](#parameter-style) is used, and if [behavior is _n/a_ (cannot be serialized)](#style-examples), the value of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's [Schema Object](#schema-object) are implementation-defined. This field is valid only for `query` parameters. Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. |
937+
| <a name="parameter-allow-empty-value"></a> allowEmptyValue | `boolean` | If `true`, clients MAY pass a zero-length string value in place of parameters that would otherwise be omitted entirely, which the server SHOULD interpret as the parameter being unused. Default value is `false`. If [`style`](#parameter-style) is used, and if [behavior is _n/a_ (cannot be serialized)](#style-examples), the value of `allowEmptyValue` SHALL be ignored. Interactions between this field and the parameter's [Schema Object](#schema-object) are implementation-defined. This field is valid only for `query` parameters. <br><br>**Deprecated:** Use of this field is NOT RECOMMENDED, and it is likely to be removed in a later revision. |
930938

931939
This object MAY be extended with [Specification Extensions](#specification-extensions).
932940

0 commit comments

Comments
 (0)