doc/DEPRECATION.md
In the examples below, the deprecation dates should follow these rules:
NOTICE date should be the date that the deprecation warning
will first be visible in production.EFFECTIVE date, add 90 days to the NOTICE
date. If that day is a production release date, use that date. If that
date is not a production release date, use the next production release
date after that date.To deprecate an API method, use the @deprecated_method tag. You must provide
a NOTICE date and an EFFECTIVE date for the deprecation, along with a
description for the deprecation.
# @deprecated_method NOTICE YYYY-MM-DD EFFECTIVE YYYY-MM-DD
# A description of the deprecated method and why we're deprecating it.
# Use {api:FooController#bar_action Foo#bar_action} instead.
def foo_action
end
def bar_action
end
# @deprecated_method NOTICE YYYY-MM-DD EFFECTIVE YYYY-MM-DD
# A description of the deprecated method and why we're deprecating it.
def foo_action
end
To deprecate an API model, add the deprecated, deprecation_notice,
deprecation_effective, and deprecation_description keys. These keys can be
applied at the base model level to deprecate the entire model, or they can be
applied at the property level to individually deprecate model properties.
# @model Foo
# {
# "id": "Foo",
# "description": "A description.",
# "deprecated": true,
# "deprecation_notice": "YYYY-MM-DD",
# "deprecation_effective": "YYYY-MM-DD",
# "deprecation_description": "A description of the deprecation.",
# "properties": {
# "bar": {
# "description": "A property.",
# "example": "baz",
# "type": "string"
# }
# }
# }
# @model Foo
# {
# "id": "Foo",
# "description": "A description.",
# "properties": {
# "bar": {
# "deprecated": true,
# "deprecation_notice": "YYYY-MM-DD",
# "deprecation_effective": "YYYY-MM-DD",
# "deprecation_description": "A description of the deprecation.",
# "description": "A property.",
# "example": "baz",
# "type": "string"
# }
# }
# }
To deprecate an API argument, rename the @argument tag to
@deprecated_argument. You must provide a NOTICE date and an EFFECTIVE date
for the deprecation, along with a description for the deprecation.
Before:
# @argument foo [Required, String]
# A description of the argument.
After:
# @deprecated_argument foo [Required, String] NOTICE YYYY-MM-DD EFFECTIVE YYYY-MM-DD
# A description of the argument, along with a description of the deprecation.
To deprecate an API response field, rename the @response_field tag to
@deprecated_response_field. You must provide a NOTICE date and an
EFFECTIVE date for the deprecation, along with a description for the
deprecation.
Before:
# @response_field foo
# A description of the response field.
After:
# @deprecated_response_field foo NOTICE YYYY-MM-DD EFFECTIVE YYYY-MM-DD
# A description of the response field, along with a description of the
# deprecation.