Class CookieDocumentation
- Since:
- 3.0
- Author:
- Clyde Stubbs, Andy Wilkinson
-
Method Summary
Modifier and TypeMethodDescriptionstatic CookieDescriptor
cookieWithName
(String name) Creates aCookieDescriptor
that describes a cookie with the givenname
.static RequestCookiesSnippet
relaxedRequestCookies
(List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operation's request.static RequestCookiesSnippet
relaxedRequestCookies
(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's request.static RequestCookiesSnippet
relaxedRequestCookies
(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's request.static RequestCookiesSnippet
relaxedRequestCookies
(CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operation's request.static ResponseCookiesSnippet
relaxedResponseCookies
(List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operation's response.static ResponseCookiesSnippet
relaxedResponseCookies
(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's response.static ResponseCookiesSnippet
relaxedResponseCookies
(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's response.static ResponseCookiesSnippet
relaxedResponseCookies
(CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operation's response.static RequestCookiesSnippet
requestCookies
(List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operation's request.static RequestCookiesSnippet
requestCookies
(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's request.static RequestCookiesSnippet
requestCookies
(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's request.static RequestCookiesSnippet
requestCookies
(CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operation's request.static ResponseCookiesSnippet
responseCookies
(List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operation's response.static ResponseCookiesSnippet
responseCookies
(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's response.static ResponseCookiesSnippet
responseCookies
(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's response.static ResponseCookiesSnippet
responseCookies
(CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operation's response.
-
Method Details
-
cookieWithName
Creates aCookieDescriptor
that describes a cookie with the givenname
.- Parameters:
name
- the name of the cookie- Returns:
- a
CookieDescriptor
ready for further configuration
-
requestCookies
Returns a newSnippet
that will document the cookies of the API operation's request. The cookies will be documented using the givendescriptors
.If a cookie is present in the request, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the request, a failure will also occur.
- Parameters:
descriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
requestCookies
Returns a newSnippet
that will document the cookies of the API operation's request. The cookies will be documented using the givendescriptors
.If a cookie is present in the request, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the request, a failure will also occur.
- Parameters:
descriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
relaxedRequestCookies
Returns a newSnippet
that will document the cookies of the API operation's request. The cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
descriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
relaxedRequestCookies
Returns a newSnippet
that will document the cookies of the API operation's request. The cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
descriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
requestCookies
public static RequestCookiesSnippet requestCookies(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's request. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is present in the request, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the request, a failure will also occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
requestCookies
public static RequestCookiesSnippet requestCookies(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's request. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is present in the request, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the request, a failure will also occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
relaxedRequestCookies
public static RequestCookiesSnippet relaxedRequestCookies(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's request. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
relaxedRequestCookies
public static RequestCookiesSnippet relaxedRequestCookies(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's request. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the request, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the request's cookies- Returns:
- the snippet that will document the request cookies
- See Also:
-
responseCookies
Returns a newSnippet
that will document the cookies of the API operation's response. The cookies will be documented using the givendescriptors
.If a cookie is present in the response, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the response, a failure will also occur.
- Parameters:
descriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
responseCookies
Returns a newSnippet
that will document the cookies of the API operation's response. The cookies will be documented using the givendescriptors
.If a cookie is present in the response, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the response, a failure will also occur.
- Parameters:
descriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
relaxedResponseCookies
Returns a newSnippet
that will document the cookies of the API operation's response. The cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the response, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
descriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
relaxedResponseCookies
Returns a newSnippet
that will document the cookies of the API operation's response. The cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the response, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
descriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
responseCookies
public static ResponseCookiesSnippet responseCookies(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's response. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is present in the response, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the response, a failure will also occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
responseCookies
public static ResponseCookiesSnippet responseCookies(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's response. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is present in the response, but is not documented by one of the descriptors, a failure will occur when the snippet is invoked. Similarly, if a cookie is documented, is not marked as optional, and is not present in the response, a failure will also occur.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
relaxedResponseCookies
public static ResponseCookiesSnippet relaxedResponseCookies(Map<String, Object> attributes, CookieDescriptor... descriptors) Returns a newSnippet
that will document the cookies of the API operations's response. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the response, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-
relaxedResponseCookies
public static ResponseCookiesSnippet relaxedResponseCookies(Map<String, Object> attributes, List<CookieDescriptor> descriptors) Returns a newSnippet
that will document the cookies of the API operations's response. The givenattributes
will be available during snippet generation and the cookies will be documented using the givendescriptors
.If a cookie is documented, is not marked as optional, and is not present in the response, a failure will occur. Any undocumented cookies will be ignored.
- Parameters:
attributes
- the attributesdescriptors
- the descriptions of the response's cookies- Returns:
- the snippet that will document the response cookies
- See Also:
-