public abstract class HypermediaDocumentation extends Object
| Modifier and Type | Method and Description |
|---|---|
static LinkExtractor |
atomLinks()
Returns a
LinkExtractor capable of extracting links in Atom format where
the links are found in an array named links. |
static LinkExtractor |
halLinks()
Returns a
LinkExtractor capable of extracting links in Hypermedia
Application Language (HAL) format where the links are found in a map named
_links. |
static Snippet |
links(LinkDescriptor... descriptors)
Returns a handler that will produce a snippet documenting the links in the API
call's response.
|
static Snippet |
links(LinkExtractor linkExtractor,
LinkDescriptor... descriptors)
Returns a handler that will produce a snippet documenting the links in the API
call's response.
|
static Snippet |
links(LinkExtractor linkExtractor,
Map<String,Object> attributes,
LinkDescriptor... descriptors)
Returns a handler that will produce a snippet documenting the links in the API
call's response.
|
static Snippet |
links(Map<String,Object> attributes,
LinkDescriptor... descriptors)
Returns a handler that will produce a snippet documenting the links in the API
call's response.
|
static LinkDescriptor |
linkWithRel(String rel)
Creates a
LinkDescriptor that describes a link with the given rel. |
public static LinkDescriptor linkWithRel(String rel)
LinkDescriptor that describes a link with the given rel.rel - The rel of the linkLinkDescriptor ready for further configurationpublic static Snippet links(LinkDescriptor... descriptors)
descriptors - The descriptions of the response's linkspublic static Snippet links(Map<String,Object> attributes, LinkDescriptor... descriptors)
attributes will be available during snippet
generation. Links will be extracted from the response automatically based on its
content type.attributes - Attributes made available during rendering of the links snippetdescriptors - The descriptions of the response's linkspublic static Snippet links(LinkExtractor linkExtractor, LinkDescriptor... descriptors)
linkExtractor.linkExtractor - Used to extract the links from the responsedescriptors - The descriptions of the response's linkspublic static Snippet links(LinkExtractor linkExtractor, Map<String,Object> attributes, LinkDescriptor... descriptors)
attributes will be available during snippet
generation. Links will be extracted from the response using the given
linkExtractor.attributes - Attributes made available during rendering of the links snippetlinkExtractor - Used to extract the links from the responsedescriptors - The descriptions of the response's linkspublic static LinkExtractor halLinks()
LinkExtractor capable of extracting links in Hypermedia
Application Language (HAL) format where the links are found in a map named
_links.public static LinkExtractor atomLinks()
LinkExtractor capable of extracting links in Atom format where
the links are found in an array named links.