Package | Description |
---|---|
org.springframework.restdocs.payload |
Documenting the payload of a RESTful API's requests and responses.
|
Modifier and Type | Interface and Description |
---|---|
interface |
PayloadSubsectionExtractor<T extends PayloadSubsectionExtractor<T>>
Strategy interface for extracting a subsection of a payload.
|
Modifier and Type | Class and Description |
---|---|
class |
FieldPathPayloadSubsectionExtractor
A
PayloadSubsectionExtractor that extracts the subsection of the JSON payload
identified by a field path. |
Modifier and Type | Method and Description |
---|---|
static PayloadSubsectionExtractor<?> |
PayloadDocumentation.beneathPath(java.lang.String path)
Returns a
PayloadSubsectionExtractor that will extract the subsection of
the JSON payload found beneath the given path . |
protected PayloadSubsectionExtractor<?> |
AbstractFieldsSnippet.getSubsectionExtractor()
Returns the
PayloadSubsectionExtractor , if any, used by this snippet. |
Modifier and Type | Method and Description |
---|---|
static RequestFieldsSnippet |
PayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operations's request payload extracted by the given subsectionExtractor
. |
static RequestFieldsSnippet |
PayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operations's request payload extracted by the given subsectionExtractor
. |
static RequestFieldsSnippet |
PayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operation's request payload extracted by the given subsectionExtractor . |
static RequestFieldsSnippet |
PayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operation's request payload extracted by the given subsectionExtractor . |
static RequestPartFieldsSnippet |
PayloadDocumentation.relaxedRequestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.relaxedRequestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.relaxedRequestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.relaxedRequestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static RequestBodySnippet |
PayloadDocumentation.requestBody(PayloadSubsectionExtractor<?> subsectionExtractor)
Returns a
Snippet that will document a subsection of the body of the API
operation's request payload. |
static RequestBodySnippet |
PayloadDocumentation.requestBody(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Returns a
Snippet that will document a subsection of the body of the API
operation's request payload. |
static RequestFieldsSnippet |
PayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of the subsection of API
operations's request payload extracted by the given subsectionExtractor . |
static RequestFieldsSnippet |
PayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields in the subsection of the
API operations's request payload extracted by the given subsectionExtractor
. |
static RequestFieldsSnippet |
PayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operation's request payload extracted by the given subsectionExtractor . |
static RequestFieldsSnippet |
PayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of the subsection of the
API operation's request payload extracted by the given subsectionExtractor . |
static RequestPartBodySnippet |
PayloadDocumentation.requestPartBody(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor)
Returns a
Snippet that will document a subsection of the body of specified
part of the API operation's request payload. |
static RequestPartBodySnippet |
PayloadDocumentation.requestPartBody(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Returns a
Snippet that will document a subsection of the body of specified
part of the API operation's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.requestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.requestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.requestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static RequestPartFieldsSnippet |
PayloadDocumentation.requestPartFields(java.lang.String part,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the
specified part of the API operations's request payload. |
static ResponseBodySnippet |
PayloadDocumentation.responseBody(PayloadSubsectionExtractor<?> subsectionExtractor)
Returns a
Snippet that will document a subsection of the body of the API
operation's response payload. |
static ResponseBodySnippet |
PayloadDocumentation.responseBody(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Returns a
Snippet that will document a subsection of the body of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
FieldDescriptor... descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
static ResponseFieldsSnippet |
PayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes,
java.util.List<FieldDescriptor> descriptors)
Returns a
Snippet that will document the fields of a subsection of the API
operation's response payload. |
Constructor and Description |
---|
AbstractBodySnippet(java.lang.String type,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
AbstractBodySnippet that will produce a snippet named
<type>-body using a template named <type>-body . |
AbstractBodySnippet(java.lang.String name,
java.lang.String type,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
AbstractBodySnippet that will produce a snippet named
<name>-body using a template named <type>-body . |
AbstractFieldsSnippet(java.lang.String type,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedFields,
PayloadSubsectionExtractor<?> subsectionExtractor)
Creates a new
AbstractFieldsSnippet that will produce a snippet named
<type>-fields using a template named <type>-fields . |
AbstractFieldsSnippet(java.lang.String name,
java.lang.String type,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedFields,
PayloadSubsectionExtractor<?> subsectionExtractor)
Creates a new
AbstractFieldsSnippet that will produce a snippet named
<name>-fields using a template named <type>-fields . |
RequestBodySnippet(PayloadSubsectionExtractor<?> subsectionExtractor)
Creates a new
RequestBodySnippet that will document the subsection of the
request body extracted by the given subsectionExtractor . |
RequestBodySnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestBodySnippet that will document the subsection of the
request body extracted by the given subsectionExtractor . |
RequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Creates a new
RequestFieldsSnippet that will document the fields in the
subsection of the request extracted by the given subsectionExtractor using
the given descriptors . |
RequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
boolean ignoreUndocumentedFields)
Creates a new
RequestFieldsSnippet that will document the fields in the
subsection of the request extracted by the given subsectionExtractor using
the given descriptors . |
RequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestFieldsSnippet that will document the fields in the
subsection of the request extracted by the given subsectionExtractor using
the given descriptors . |
RequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedFields)
Creates a new
RequestFieldsSnippet that will document the fields in the
subsection of the request extracted by the given subsectionExtractor using
the given descriptors . |
RequestPartBodySnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor)
Creates a new
RequestPartBodySnippet that will document the subsection of
the body of the request part with the given partName extracted by the given
subsectionExtractor . |
RequestPartBodySnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestPartBodySnippet that will document the body of the
request part with the given partName . |
RequestPartFieldsSnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Creates a new
RequestPartFieldsSnippet that will document the fields in a
subsection of the request part using the given descriptors . |
RequestPartFieldsSnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
boolean ignoreUndocumentedFields)
Creates a new
RequestPartFieldsSnippet that will document the fields in a
subsection the request part using the given descriptors . |
RequestPartFieldsSnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
RequestPartFieldsSnippet that will document the fields in a
subsection of the request part using the given descriptors . |
RequestPartFieldsSnippet(java.lang.String partName,
PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedFields)
Creates a new
RequestPartFieldsSnippet that will document the fields in a
subsection of the request part using the given descriptors . |
ResponseBodySnippet(PayloadSubsectionExtractor<?> subsectionExtractor)
Creates a new
ResponseBodySnippet that will document the subsection of the
response body extracted by the given subsectionExtractor . |
ResponseBodySnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
ResponseBodySnippet that will document the subsection of the
response body extracted by the given subsectionExtractor . |
ResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors)
Creates a new
ResponseFieldsSnippet that will document the fields in a
subsection of the response using the given descriptors . |
ResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
boolean ignoreUndocumentedFields)
Creates a new
ResponseFieldsSnippet that will document the fields in the
subsection of the response using the given descriptors . |
ResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes)
Creates a new
ResponseFieldsSnippet that will document the fields in a
subsection of the response using the given descriptors . |
ResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor,
java.util.List<FieldDescriptor> descriptors,
java.util.Map<java.lang.String,java.lang.Object> attributes,
boolean ignoreUndocumentedFields)
Creates a new
ResponseFieldsSnippet that will document the fields in a
subsection of the response using the given descriptors . |