public class PathParametersSnippet extends AbstractParametersSnippet
Snippet
that documents the path parameters supported by a RESTful resource.RequestDocumentation.pathParameters(ParameterDescriptor...)
,
RequestDocumentation.pathParameters(Map, ParameterDescriptor...)
Modifier | Constructor and Description |
---|---|
protected |
PathParametersSnippet(List<ParameterDescriptor> descriptors)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
protected |
PathParametersSnippet(List<ParameterDescriptor> descriptors,
Map<String,Object> attributes)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
Modifier and Type | Method and Description |
---|---|
protected Map<String,Object> |
createModel(Operation operation)
Create the model that should be used during template rendering to document the
given
operation . |
protected Set<String> |
extractActualParameters(Operation operation) |
protected void |
verificationFailed(Set<String> undocumentedParameters,
Set<String> missingParameters) |
createModelForDescriptor, getFieldDescriptors, verifyParameterDescriptors
document, getAttributes, getSnippetName
protected PathParametersSnippet(List<ParameterDescriptor> descriptors)
PathParametersSnippet
that will document the request's path
parameters using the given descriptors
.descriptors
- the parameter descriptorsprotected PathParametersSnippet(List<ParameterDescriptor> descriptors, Map<String,Object> attributes)
PathParametersSnippet
that will document the request's path
parameters using the given descriptors
. The given attributes
will
be included in the model during template rendering.descriptors
- the parameter descriptorsattributes
- the additional attributesprotected Map<String,Object> createModel(Operation operation)
TemplatedSnippet
operation
. Any additional attributes that were supplied when this
TemplatedSnippet
were created will be automatically added to the model
prior to rendering.createModel
in class AbstractParametersSnippet
operation
- The operationprotected Set<String> extractActualParameters(Operation operation)
extractActualParameters
in class AbstractParametersSnippet
protected void verificationFailed(Set<String> undocumentedParameters, Set<String> missingParameters)
verificationFailed
in class AbstractParametersSnippet