Derive a link's description from its title
Previously, a LinkDescriptor had to be created with both a rel and a description. If a description was not provided a failure would occur. This commit relaxes the above-described restriction by allowing a link's title to be used as its default description. If a descriptor has a description, it will always be used irrespective of whether or not the link has a title. If the descriptor does not have a description and the link does have a title, the link's title will be used. If the descriptor does not have a description and the link does not have a title a failure will occur. Closes gh-105
This commit is contained in:
@@ -38,6 +38,10 @@ include::{examples-dir}/com/example/restassured/Hypermedia.java[tag=links]
|
||||
The result is a snippet named `links.adoc` that contains a table describing the resource's
|
||||
links.
|
||||
|
||||
TIP: If a link in the response has a `title`, the description can be omitted from its
|
||||
descriptor and the `title` will be used. If you omit the description and the link does
|
||||
not have a `title` a failure will occur.
|
||||
|
||||
When documenting links, the test will fail if an undocumented link is found in the
|
||||
response. Similarly, the test will also fail if a documented link is not found in the
|
||||
response and the link has not been marked as optional.
|
||||
|
||||
Reference in New Issue
Block a user