public class JacksonResponseFieldSnippet extends StandardTableSnippet
| Modifier and Type | Field and Description |
|---|---|
static String |
RESPONSE_FIELDS |
static String |
SPRING_DATA_PAGE_CLASS |
| Constructor and Description |
|---|
JacksonResponseFieldSnippet() |
JacksonResponseFieldSnippet(Type responseBodyType,
boolean failOnUndocumentedFields) |
| Modifier and Type | Method and Description |
|---|---|
protected Collection<org.springframework.restdocs.payload.FieldDescriptor> |
createFieldDescriptors(org.springframework.restdocs.operation.Operation operation,
org.springframework.web.method.HandlerMethod handlerMethod) |
protected void |
enrichModel(Map<String,Object> model,
org.springframework.web.method.HandlerMethod handlerMethod) |
JacksonResponseFieldSnippet |
failOnUndocumentedFields(boolean failOnUndocumentedFields) |
protected Type |
firstGenericType(org.springframework.core.MethodParameter param) |
String |
getFileName()
File name (= section name).
|
String |
getHeaderKey()
Section header key corresponding to entry in translation file.
|
protected String[] |
getTranslationKeys() |
protected Type |
getType(org.springframework.web.method.HandlerMethod method) |
boolean |
hasContent(org.springframework.restdocs.operation.Operation operation)
Flag if section will render non-empty content.
|
protected boolean |
isCollection(Class<?> type) |
JacksonResponseFieldSnippet |
responseBodyAsType(Type responseBodyType) |
protected boolean |
shouldFailOnUndocumentedFields() |
createModel, createModelForDescriptorpublic static final String RESPONSE_FIELDS
public static final String SPRING_DATA_PAGE_CLASS
public JacksonResponseFieldSnippet()
public JacksonResponseFieldSnippet(Type responseBodyType, boolean failOnUndocumentedFields)
public JacksonResponseFieldSnippet responseBodyAsType(Type responseBodyType)
public JacksonResponseFieldSnippet failOnUndocumentedFields(boolean failOnUndocumentedFields)
protected Type getType(org.springframework.web.method.HandlerMethod method)
protected void enrichModel(Map<String,Object> model, org.springframework.web.method.HandlerMethod handlerMethod)
enrichModel in class StandardTableSnippetpublic String getHeaderKey()
SectionSupportprotected boolean shouldFailOnUndocumentedFields()
protected String[] getTranslationKeys()
getTranslationKeys in class StandardTableSnippetprotected Collection<org.springframework.restdocs.payload.FieldDescriptor> createFieldDescriptors(org.springframework.restdocs.operation.Operation operation, org.springframework.web.method.HandlerMethod handlerMethod)
createFieldDescriptors in class StandardTableSnippetprotected Type firstGenericType(org.springframework.core.MethodParameter param)
protected boolean isCollection(Class<?> type)
public String getFileName()
SectionSupportgetFileName in interface SectionSupportpublic boolean hasContent(org.springframework.restdocs.operation.Operation operation)
SectionSupporthasContent in interface SectionSupportoperation - operationCopyright © 2018 Scalable Capital GmbH. All rights reserved.