public class RequestPartsSnippet extends TemplatedSnippet
Snippet that documents the request parts supported by a RESTful resource.RequestDocumentation.requestParts(RequestPartDescriptor...),
RequestDocumentation.requestParts(Map, RequestPartDescriptor...),
RequestDocumentation.relaxedRequestParts(RequestPartDescriptor...),
RequestDocumentation.relaxedRequestParts(Map, RequestPartDescriptor...)| Modifier | Constructor and Description |
|---|---|
protected |
RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors)
Creates a new
RequestPartsSnippet that will document the request's parts
using the given descriptors. |
protected |
RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors,
boolean ignoreUndocumentedParts)
Creates a new
RequestPartsSnippet that will document the request's parts
using the given descriptors. |
protected |
RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestPartsSnippet that will document the request's parts
using the given descriptors. |
protected |
RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedParts)
Creates a new
RequestPartsSnippet that will document the request's parts
using the given descriptors. |
| Modifier and Type | Method and Description |
|---|---|
RequestPartsSnippet |
and(java.util.List<RequestPartDescriptor> additionalDescriptors)
Returns a new
RequestPartsSnippet configured with this snippet's attributes
and its descriptors combined with the given additionalDescriptors. |
RequestPartsSnippet |
and(RequestPartDescriptor... additionalDescriptors)
Returns a new
RequestPartsSnippet configured with this snippet's attributes
and its descriptors combined with the given additionalDescriptors. |
protected java.util.Map<java.lang.String,java.lang.Object> |
createModel(Operation operation)
Create the model that should be used during template rendering to document the
given
operation. |
document, getAttributes, getSnippetNameprotected RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors)
RequestPartsSnippet that will document the request's parts
using the given descriptors. Undocumented parts will trigger a failure.descriptors - the parameter descriptorsprotected RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors, boolean ignoreUndocumentedParts)
RequestPartsSnippet that will document the request's parts
using the given descriptors. If ignoreUndocumentedParts is
true, undocumented parts will be ignored and will not trigger a failure.descriptors - the parameter descriptorsignoreUndocumentedParts - whether undocumented parts should be ignoredprotected RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors, java.util.Map<java.lang.String,java.lang.Object> attributes)
RequestPartsSnippet that will document the request's parts
using the given descriptors. The given attributes will be included
in the model during template rendering. Undocumented parts will trigger a failure.descriptors - the parameter descriptorsattributes - the additional attributesprotected RequestPartsSnippet(java.util.List<RequestPartDescriptor> descriptors, java.util.Map<java.lang.String,java.lang.Object> attributes, boolean ignoreUndocumentedParts)
RequestPartsSnippet that will document the request's parts
using the given descriptors. The given attributes will be included
in the model during template rendering. If ignoreUndocumentedParts is
true, undocumented parts will be ignored and will not trigger a failure.descriptors - the parameter descriptorsattributes - the additional attributesignoreUndocumentedParts - whether undocumented parts should be ignoredpublic final RequestPartsSnippet and(RequestPartDescriptor... additionalDescriptors)
RequestPartsSnippet configured with this snippet's attributes
and its descriptors combined with the given additionalDescriptors.additionalDescriptors - the additional descriptorspublic final RequestPartsSnippet and(java.util.List<RequestPartDescriptor> additionalDescriptors)
RequestPartsSnippet configured with this snippet's attributes
and its descriptors combined with the given additionalDescriptors.additionalDescriptors - the additional descriptorsprotected java.util.Map<java.lang.String,java.lang.Object> createModel(Operation operation)
TemplatedSnippetoperation. Any additional attributes that were supplied when this
TemplatedSnippet were created will be automatically added to the model
prior to rendering.createModel in class TemplatedSnippetoperation - The operation