Class HeaderDocumentation
- Author:
- Andreas Evers, Andy Wilkinson, Marcel Overdijk
-
Method Summary
Modifier and TypeMethodDescriptionstatic HeaderDescriptorheaderWithName(String name) Creates aHeaderDescriptorthat describes a header with the givenname.static RequestHeadersSnippetrequestHeaders(List<HeaderDescriptor> descriptors) Returns a newSnippetthat will document the headers of the API operation's request.static RequestHeadersSnippetrequestHeaders(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippetthat will document the headers of the API operations's request.static RequestHeadersSnippetrequestHeaders(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippetthat will document the headers of the API operations's request.static RequestHeadersSnippetrequestHeaders(HeaderDescriptor... descriptors) Returns a newSnippetthat will document the headers of the API operation's request.static ResponseHeadersSnippetresponseHeaders(List<HeaderDescriptor> descriptors) Returns a newSnippetthat will document the headers of the API operation's response.static ResponseHeadersSnippetresponseHeaders(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippetthat will document the headers of the API operations's response.static ResponseHeadersSnippetresponseHeaders(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippetthat will document the headers of the API operations's response.static ResponseHeadersSnippetresponseHeaders(HeaderDescriptor... descriptors) Returns a newSnippetthat will document the headers of the API operation's response.
-
Method Details
-
headerWithName
Creates aHeaderDescriptorthat describes a header with the givenname.- Parameters:
name- the name of the header- Returns:
- a
HeaderDescriptorready for further configuration
-
requestHeaders
Returns a newSnippetthat 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 newSnippetthat 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 newSnippetthat will document the headers of the API operations's request. The givenattributeswill 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 newSnippetthat will document the headers of the API operations's request. The givenattributeswill 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 newSnippetthat 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 newSnippetthat 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 newSnippetthat will document the headers of the API operations's response. The givenattributeswill 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 newSnippetthat will document the headers of the API operations's response. The givenattributeswill 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:
-