Package | Description |
---|---|
org.springframework.restdocs.request |
Documenting query and path parameters of requests sent to a RESTful API.
|
Modifier and Type | Method and Description |
---|---|
ParameterDescriptor |
ParameterDescriptor.optional()
Marks the parameter as optional.
|
static ParameterDescriptor |
RequestDocumentation.parameterWithName(java.lang.String name)
Creates a
ParameterDescriptor that describes a request or path parameter
with the given name . |
Modifier and Type | Method and Description |
---|---|
protected java.util.Map<java.lang.String,ParameterDescriptor> |
AbstractParametersSnippet.getFieldDescriptors()
Deprecated.
since 1.1.0 in favor of
AbstractParametersSnippet.getParameterDescriptors() |
protected java.util.Map<java.lang.String,ParameterDescriptor> |
AbstractParametersSnippet.getParameterDescriptors()
Returns a
Map of ParameterDescriptors that will
be used to generate the documentation key by their
getName() . |
Modifier and Type | Method and Description |
---|---|
RequestParametersSnippet |
RequestParametersSnippet.and(ParameterDescriptor... additionalDescriptors)
Returns a new
RequestParametersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
PathParametersSnippet |
PathParametersSnippet.and(ParameterDescriptor... additionalDescriptors)
Returns a new
PathParametersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
protected java.util.Map<java.lang.String,java.lang.Object> |
AbstractParametersSnippet.createModelForDescriptor(ParameterDescriptor descriptor)
Returns a model for the given
descriptor . |
static PathParametersSnippet |
RequestDocumentation.pathParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
ParameterDescriptor... descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.pathParameters(ParameterDescriptor... descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.relaxedPathParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
ParameterDescriptor... descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.relaxedPathParameters(ParameterDescriptor... descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.relaxedRequestParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
ParameterDescriptor... descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.relaxedRequestParameters(ParameterDescriptor... descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.requestParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
ParameterDescriptor... descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.requestParameters(ParameterDescriptor... descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
Modifier and Type | Method and Description |
---|---|
RequestParametersSnippet |
RequestParametersSnippet.and(java.util.List<ParameterDescriptor> additionalDescriptors)
Returns a new
RequestParametersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
PathParametersSnippet |
PathParametersSnippet.and(java.util.List<ParameterDescriptor> additionalDescriptors)
Returns a new
PathParametersSnippet configured with this snippet's
attributes and its descriptors combined with the given
additionalDescriptors . |
static PathParametersSnippet |
RequestDocumentation.pathParameters(java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.pathParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.relaxedPathParameters(java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static PathParametersSnippet |
RequestDocumentation.relaxedPathParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the path parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.relaxedRequestParameters(java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.relaxedRequestParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.requestParameters(java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
static RequestParametersSnippet |
RequestDocumentation.requestParameters(java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<ParameterDescriptor> descriptors)
Returns a
Snippet that will document the parameters from the API
operation's request. |
Constructor and Description |
---|
AbstractParametersSnippet(java.lang.String snippetName,
java.util.List<ParameterDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedParameters)
Creates a new
AbstractParametersSnippet that will produce a snippet with
the given snippetName that will document parameters using the given
descriptors . |
PathParametersSnippet(java.util.List<ParameterDescriptor> descriptors)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
PathParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
boolean ignoreUndocumentedParameters)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
PathParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
PathParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedParameters)
Creates a new
PathParametersSnippet that will document the request's path
parameters using the given descriptors . |
RequestParametersSnippet(java.util.List<ParameterDescriptor> descriptors)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |
RequestParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
boolean ignoreUndocumentedParameters)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |
RequestParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |
RequestParametersSnippet(java.util.List<ParameterDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedParameters)
Creates a new
RequestParametersSnippet that will document the request's
parameters using the given descriptors . |