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(List<HeaderDescriptor> descriptors)
Creates a new
RequestHeadersSnippet that will document the headers in the
request using the given descriptors. |
protected |
RequestHeadersSnippet(List<HeaderDescriptor> descriptors,
Map<String,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(List<HeaderDescriptor> additionalDescriptors)
Returns a new
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors. |
protected Set<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(List<HeaderDescriptor> descriptors)
RequestHeadersSnippet that will document the headers in the
request using the given descriptors.descriptors - the descriptorsprotected RequestHeadersSnippet(List<HeaderDescriptor> descriptors, Map<String,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 Set<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(List<HeaderDescriptor> additionalDescriptors)
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors.additionalDescriptors - the additional descriptors