Uses of Class
org.springframework.restdocs.headers.HeaderDescriptor
Package
Description
Documenting the headers of a RESTful API's requests and responses.
-
Uses of HeaderDescriptor in org.springframework.restdocs.headers
Modifier and TypeMethodDescriptionstatic HeaderDescriptor
HeaderDocumentation.headerWithName
(String name) Creates aHeaderDescriptor
that describes a header with the givenname
.final HeaderDescriptor
HeaderDescriptor.optional()
Marks the header as optional.Modifier and TypeMethodDescriptionprotected List<HeaderDescriptor>
AbstractHeadersSnippet.findMissingHeaders
(Operation operation) Finds the headers that are missing from the operation.protected final List<HeaderDescriptor>
AbstractHeadersSnippet.getHeaderDescriptors()
Returns the list ofHeaderDescriptors
that will be used to generate the documentation.Modifier and TypeMethodDescriptionfinal RequestHeadersSnippet
RequestHeadersSnippet.and
(HeaderDescriptor... additionalDescriptors) Returns a newRequestHeadersSnippet
configured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors
.final ResponseHeadersSnippet
ResponseHeadersSnippet.and
(HeaderDescriptor... additionalDescriptors) Returns a newResponseHeadersSnippet
configured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors
.AbstractHeadersSnippet.createModelForDescriptor
(HeaderDescriptor descriptor) Returns a model for the givendescriptor
.static RequestHeadersSnippet
HeaderDocumentation.requestHeaders
(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's request.static RequestHeadersSnippet
HeaderDocumentation.requestHeaders
(HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operation's request.static ResponseHeadersSnippet
HeaderDocumentation.responseHeaders
(Map<String, Object> attributes, HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operations's response.static ResponseHeadersSnippet
HeaderDocumentation.responseHeaders
(HeaderDescriptor... descriptors) Returns a newSnippet
that will document the headers of the API operation's response.Modifier and TypeMethodDescriptionfinal RequestHeadersSnippet
RequestHeadersSnippet.and
(List<HeaderDescriptor> additionalDescriptors) Returns a newRequestHeadersSnippet
configured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors
.final ResponseHeadersSnippet
ResponseHeadersSnippet.and
(List<HeaderDescriptor> additionalDescriptors) Returns a newResponseHeadersSnippet
configured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors
.static RequestHeadersSnippet
HeaderDocumentation.requestHeaders
(List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operation's request.static RequestHeadersSnippet
HeaderDocumentation.requestHeaders
(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's request.static ResponseHeadersSnippet
HeaderDocumentation.responseHeaders
(List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operation's response.static ResponseHeadersSnippet
HeaderDocumentation.responseHeaders
(Map<String, Object> attributes, List<HeaderDescriptor> descriptors) Returns a newSnippet
that will document the headers of the API operations's response.ModifierConstructorDescriptionprotected
AbstractHeadersSnippet
(String type, List<HeaderDescriptor> descriptors, Map<String, Object> attributes) Creates a newAbstractHeadersSnippet
that will produce a snippet named<type>-headers
.protected
RequestHeadersSnippet
(List<HeaderDescriptor> descriptors) Creates a newRequestHeadersSnippet
that will document the headers in the request using the givendescriptors
.protected
RequestHeadersSnippet
(List<HeaderDescriptor> descriptors, Map<String, Object> attributes) Creates a newRequestHeadersSnippet
that will document the headers in the request using the givendescriptors
.protected
ResponseHeadersSnippet
(List<HeaderDescriptor> descriptors) Creates a newResponseHeadersSnippet
that will document the headers in the response using the givendescriptors
.protected
ResponseHeadersSnippet
(List<HeaderDescriptor> descriptors, Map<String, Object> attributes) Creates a newResponseHeadersSnippet
that will document the headers in the response using the givendescriptors
.