public class ResponseHeadersSnippet extends AbstractHeadersSnippet
Snippet that documents the headers in a response.HeaderDocumentation.responseHeaders(HeaderDescriptor...),
HeaderDocumentation.responseHeaders(Map, HeaderDescriptor...)| Modifier | Constructor and Description |
|---|---|
protected |
ResponseHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
Creates a new
ResponseHeadersSnippet that will document the headers in the
response using the given descriptors. |
protected |
ResponseHeadersSnippet(java.util.List<HeaderDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
ResponseHeadersSnippet that will document the headers in the
response using the given descriptors. |
| Modifier and Type | Method and Description |
|---|---|
ResponseHeadersSnippet |
and(HeaderDescriptor... additionalDescriptors)
Returns a new
ResponseHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors. |
ResponseHeadersSnippet |
and(java.util.List<HeaderDescriptor> additionalDescriptors)
Returns a new
ResponseHeadersSnippet 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 ResponseHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
ResponseHeadersSnippet that will document the headers in the
response using the given descriptors.descriptors - the descriptorsprotected ResponseHeadersSnippet(java.util.List<HeaderDescriptor> descriptors, java.util.Map<java.lang.String,java.lang.Object> attributes)
ResponseHeadersSnippet that will document the headers in the
response 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 ResponseHeadersSnippet and(HeaderDescriptor... additionalDescriptors)
ResponseHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors.additionalDescriptors - the additional descriptorspublic final ResponseHeadersSnippet and(java.util.List<HeaderDescriptor> additionalDescriptors)
ResponseHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors.additionalDescriptors - the additional descriptors