public class RequestParametersSnippet extends AbstractParametersSnippet
Snippet
that documents the request parameters supported by a RESTful
resource.
Request parameters are sent as part of the query string or as POSTed form data.
Modifier | Constructor and Description |
---|---|
protected |
RequestParametersSnippet(List<ParameterDescriptor> descriptors)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |
protected |
RequestParametersSnippet(List<ParameterDescriptor> descriptors,
Map<String,Object> attributes)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |
Modifier and Type | Method and Description |
---|---|
protected Set<String> |
extractActualParameters(Operation operation)
Extracts the names of the parameters that were present in the given
operation . |
protected void |
verificationFailed(Set<String> undocumentedParameters,
Set<String> missingParameters)
Called when the documented parameters do not match the actual parameters.
|
createModel, createModelForDescriptor, getFieldDescriptors
document, getAttributes, getSnippetName
protected RequestParametersSnippet(List<ParameterDescriptor> descriptors)
RequestParametersSnippet
that will document the request's
parameters using the given descriptors
.descriptors
- the parameter descriptorsprotected RequestParametersSnippet(List<ParameterDescriptor> descriptors, Map<String,Object> attributes)
RequestParametersSnippet
that will document the request's
parameters using the given descriptors
. The given attributes
will
be included in the model during template rendering.descriptors
- the parameter descriptorsattributes
- the additional attributesprotected void verificationFailed(Set<String> undocumentedParameters, Set<String> missingParameters)
AbstractParametersSnippet
verificationFailed
in class AbstractParametersSnippet
undocumentedParameters
- the parameters that were found in the operation but
were not documentedmissingParameters
- the parameters that were documented but were not found in
the operationprotected Set<String> extractActualParameters(Operation operation)
AbstractParametersSnippet
operation
.extractActualParameters
in class AbstractParametersSnippet
operation
- the operation