public class RequestHeadersSnippet extends AbstractHeadersSnippet
Snippet that documents the headers in a request.HeaderDocumentation.requestHeaders(HeaderDescriptor...),
HeaderDocumentation.requestHeaders(Map, HeaderDescriptor...)| Modifier | Constructor and Description |
|---|---|
protected |
RequestHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
Creates a new
RequestHeadersSnippet that will document the headers in the
request using the given descriptors. |
protected |
RequestHeadersSnippet(java.util.List<HeaderDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestHeadersSnippet that will document the headers in the
request using the given descriptors. |
| Modifier and Type | Method and Description |
|---|---|
RequestHeadersSnippet |
and(HeaderDescriptor... additionalDescriptors)
Returns a new
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors. |
RequestHeadersSnippet |
and(java.util.List<HeaderDescriptor> additionalDescriptors)
Returns a new
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors. |
protected java.util.Set<java.lang.String> |
extractActualHeaders(Operation operation)
Extracts the names of the headers from the request or response of the given
operation. |
createModel, createModelForDescriptor, findMissingHeaders, getHeaderDescriptorsdocument, getAttributes, getSnippetNameprotected RequestHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
RequestHeadersSnippet that will document the headers in the
request using the given descriptors.descriptors - the descriptorsprotected RequestHeadersSnippet(java.util.List<HeaderDescriptor> descriptors, java.util.Map<java.lang.String,java.lang.Object> attributes)
RequestHeadersSnippet that will document the headers in the
request using the given descriptors. The given attributes will be
included in the model during template rendering.descriptors - the descriptorsattributes - the additional attributesprotected java.util.Set<java.lang.String> extractActualHeaders(Operation operation)
AbstractHeadersSnippetoperation.extractActualHeaders in class AbstractHeadersSnippetoperation - the operationpublic final RequestHeadersSnippet and(HeaderDescriptor... additionalDescriptors)
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors.additionalDescriptors - the additional descriptorspublic final RequestHeadersSnippet and(java.util.List<HeaderDescriptor> additionalDescriptors)
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors.additionalDescriptors - the additional descriptors