Package | Description |
---|---|
org.springframework.restdocs.headers |
Documenting the headers of a RESTful API's requests and responses.
|
Modifier and Type | Method and Description |
---|---|
static HeaderDescriptor |
HeaderDocumentation.headerWithName(java.lang.String name)
Creates a
HeaderDescriptor that describes a header with the given
name . |
HeaderDescriptor |
HeaderDescriptor.optional()
Marks the header as optional.
|
Modifier and Type | Method and Description |
---|---|
protected java.util.List<HeaderDescriptor> |
AbstractHeadersSnippet.findMissingHeaders(Operation operation)
Finds the headers that are missing from the operation.
|
protected java.util.List<HeaderDescriptor> |
AbstractHeadersSnippet.getHeaderDescriptors()
Returns the list of
HeaderDescriptors that will be used to
generate the documentation. |
Modifier and Type | Method and Description |
---|---|
ResponseHeadersSnippet |
ResponseHeadersSnippet.and(HeaderDescriptor... additionalDescriptors)
Returns a new
ResponseHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
RequestHeadersSnippet |
RequestHeadersSnippet.and(HeaderDescriptor... additionalDescriptors)
Returns a new
RequestHeadersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
protected java.util.Map<java.lang.String,java.lang.Object> |
AbstractHeadersSnippet.createModelForDescriptor(HeaderDescriptor descriptor)
Returns a model for the given
descriptor . |
static RequestHeadersSnippet |
HeaderDocumentation.requestHeaders(HeaderDescriptor... descriptors)
Returns a new
Snippet that will document the headers of the API operation's
request. |
static RequestHeadersSnippet |
HeaderDocumentation.requestHeaders(java.util.Map<java.lang.String,java.lang.Object> attributes,
HeaderDescriptor... descriptors)
Returns a new
Snippet that will document the headers of the API
operations's request. |
static ResponseHeadersSnippet |
HeaderDocumentation.responseHeaders(HeaderDescriptor... descriptors)
Returns a new
Snippet that will document the headers of the API operation's
response. |
static ResponseHeadersSnippet |
HeaderDocumentation.responseHeaders(java.util.Map<java.lang.String,java.lang.Object> attributes,
HeaderDescriptor... descriptors)
Returns a new
Snippet that will document the headers of the API
operations's response. |
Modifier and Type | Method and Description |
---|---|
ResponseHeadersSnippet |
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 . |
RequestHeadersSnippet |
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 . |
static RequestHeadersSnippet |
HeaderDocumentation.requestHeaders(java.util.List<HeaderDescriptor> descriptors)
Returns a new
Snippet that will document the headers of the API operation's
request. |
static RequestHeadersSnippet |
HeaderDocumentation.requestHeaders(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<HeaderDescriptor> descriptors)
Returns a new
Snippet that will document the headers of the API
operations's request. |
static ResponseHeadersSnippet |
HeaderDocumentation.responseHeaders(java.util.List<HeaderDescriptor> descriptors)
Returns a new
Snippet that will document the headers of the API operation's
response. |
static ResponseHeadersSnippet |
HeaderDocumentation.responseHeaders(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<HeaderDescriptor> descriptors)
Returns a new
Snippet that will document the headers of the API
operations's response. |
Constructor and Description |
---|
AbstractHeadersSnippet(java.lang.String type,
java.util.List<HeaderDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
AbstractHeadersSnippet that will produce a snippet named
<type>-headers . |
RequestHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
Creates a new
RequestHeadersSnippet that will document the headers in the
request using the given descriptors . |
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 . |
ResponseHeadersSnippet(java.util.List<HeaderDescriptor> descriptors)
Creates a new
ResponseHeadersSnippet that will document the headers in the
response using the given descriptors . |
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 . |