Class HeaderDocumentation
- Author:
- Andreas Evers, Andy Wilkinson, Marcel Overdijk
-
Method Summary
Modifier and TypeMethodDescriptionstatic HeaderDescriptor
headerWithName
(String name) Creates aHeaderDescriptor
that describes a header with the givenname
.static RequestHeadersSnippet
requestHeaders
(List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operation's request.static RequestHeadersSnippet
requestHeaders
(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's request.static RequestHeadersSnippet
requestHeaders
(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's request.static RequestHeadersSnippet
requestHeaders
(HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operation's request.static ResponseHeadersSnippet
responseHeaders
(List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operation's response.static ResponseHeadersSnippet
responseHeaders
(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's response.static ResponseHeadersSnippet
responseHeaders
(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's response.static ResponseHeadersSnippet
responseHeaders
(HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operation's response.
-
Method Details
-
headerWithName
Creates aHeaderDescriptor
that describes a header with the givenname
.- Parameters:
name
- the name of the header- Returns:
- a
HeaderDescriptor
ready for further configuration
-
requestHeaders
Returns a newSnippet
that will document the headers of the API operation's request. The headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
descriptors
- the descriptions of the request's headers- Returns:
- the snippet that will document the request headers
- See Also:
-
requestHeaders
Returns a newSnippet
that will document the headers of the API operation's request. The headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
descriptors
- the descriptions of the request's headers- Returns:
- the snippet that will document the request headers
- See Also:
-
requestHeaders
public static RequestHeadersSnippet requestHeaders(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's request. The givenattributes
will be available during snippet generation and the headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's headers- Returns:
- the snippet that will document the request headers
- See Also:
-
requestHeaders
public static RequestHeadersSnippet requestHeaders(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's request. The givenattributes
will be available during snippet generation and the headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's headers- Returns:
- the snippet that will document the request headers
- See Also:
-
responseHeaders
Returns a newSnippet
that will document the headers of the API operation's response. The headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
descriptors
- the descriptions of the response's headers- Returns:
- the snippet that will document the response headers
- See Also:
-
responseHeaders
Returns a newSnippet
that will document the headers of the API operation's response. The headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the request, a failure will occur.
- Parameters:
descriptors
- the descriptions of the response's headers- Returns:
- the snippet that will document the response headers
- See Also:
-
responseHeaders
public static ResponseHeadersSnippet responseHeaders(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's response. The givenattributes
will be available during snippet generation and the headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the response, a failure will occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's headers- Returns:
- the snippet that will document the response headers
- See Also:
-
responseHeaders
public static ResponseHeadersSnippet responseHeaders(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's response. The givenattributes
will be available during snippet generation and the headers will be documented using the givendescriptors
.If a header is documented, is not marked as optional, and is not present in the response, a failure will occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's headers- Returns:
- the snippet that will document the response headers
- See Also:
-