Add support for property deprecation

Previously, an item could only have a 'deprecated' boolean flag to
indicate that the property is deprecated. It is desirable to provide an
additional description for the deprecation as well as the name of the
property to use instead.

The `deprecated` boolean flag is now supported. Instead, a `deprecated`
object can be specified with two optional attributes: `reason` to provide
an explanation for the deprecation and `replacement` to refer to the
property that should be used instead. If none of them is present, an
empty deprecation object should be set.

For backward compatibility, the `deprecated` field is still set.

Deprecation information can only set via manual meta-data.

Closes gh-3449
This commit is contained in:
Stephane Nicoll
2015-07-15 15:41:52 +02:00
parent b1e9139efe
commit f2d32d3e98
15 changed files with 370 additions and 78 deletions

View File

@@ -150,19 +150,25 @@
"name": "spring.view.prefix",
"type": "java.lang.String",
"description": "Spring MVC view prefix.",
"deprecated": true
"deprecation": {
"replacement": "spring.mvc.view.prefix"
}
},
{
"name": "spring.view.suffix",
"type": "java.lang.String",
"description": "Spring MVC view suffix.",
"deprecated": true
"deprecation": {
"replacement": "spring.mvc.view.suffix"
}
},
{
"name": "server.session-timeout",
"type": "java.lang.Integer",
"description": "Session timeout in seconds.",
"deprecated": true
"deprecation": {
"replacement": "server.session.timeout"
}
}
],"hints": [
{