Uses of Class
org.springframework.restdocs.payload.FieldDescriptor
Packages that use FieldDescriptor
Package
Description
Documenting the payload of a RESTful API's requests and responses.
-
Uses of FieldDescriptor in org.springframework.restdocs.payload
Subclasses of FieldDescriptor in org.springframework.restdocs.payloadMethods in org.springframework.restdocs.payload that return FieldDescriptorModifier and TypeMethodDescriptionstatic FieldDescriptorPayloadDocumentation.fieldWithPath(String path) Creates aFieldDescriptorthat describes a field with the givenpath.final FieldDescriptorFieldDescriptor.optional()Marks the field as optional.final FieldDescriptorSpecifies the type of the field.Methods in org.springframework.restdocs.payload that return types with arguments of type FieldDescriptorModifier and TypeMethodDescriptionstatic List<FieldDescriptor>PayloadDocumentation.applyPathPrefix(String pathPrefix, List<FieldDescriptor> descriptors) Creates a copy of the givendescriptorswith the givenpathPrefixapplied to their paths.protected final List<FieldDescriptor>AbstractFieldsSnippet.getFieldDescriptors()Returns the list ofFieldDescriptorsthat will be used to generate the documentation.Methods in org.springframework.restdocs.payload with parameters of type FieldDescriptorModifier and TypeMethodDescriptionfinal RequestFieldsSnippetRequestFieldsSnippet.and(FieldDescriptor... additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestPartFieldsSnippetRequestPartFieldsSnippet.and(FieldDescriptor... additionalDescriptors) Returns a newRequestPartFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final ResponseFieldsSnippetResponseFieldsSnippet.and(FieldDescriptor... additionalDescriptors) Returns a newResponseFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestFieldsSnippetRequestFieldsSnippet.andWithPrefix(String pathPrefix, FieldDescriptor... additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestPartFieldsSnippetRequestPartFieldsSnippet.andWithPrefix(String pathPrefix, FieldDescriptor... additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final ResponseFieldsSnippetResponseFieldsSnippet.andWithPrefix(String pathPrefix, FieldDescriptor... additionalDescriptors) Returns a newResponseFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.AbstractFieldsSnippet.createModelForDescriptor(FieldDescriptor descriptor) Returns a model for the givendescriptor.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetPayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the subsection of API operations's request payload extracted by the givensubsectionExtractor.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.FieldTypeResolver.resolveFieldType(FieldDescriptor fieldDescriptor) Resolves the type of the field that is described by the givenfieldDescriptorbased on the content of the payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, FieldDescriptor... descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.Method parameters in org.springframework.restdocs.payload with type arguments of type FieldDescriptorModifier and TypeMethodDescriptionfinal RequestFieldsSnippetRequestFieldsSnippet.and(List<FieldDescriptor> additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestPartFieldsSnippetRequestPartFieldsSnippet.and(List<FieldDescriptor> additionalDescriptors) Returns a newRequestPartFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final ResponseFieldsSnippetResponseFieldsSnippet.and(List<FieldDescriptor> additionalDescriptors) Returns a newResponseFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestFieldsSnippetRequestFieldsSnippet.andWithPrefix(String pathPrefix, List<FieldDescriptor> additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final RequestPartFieldsSnippetRequestPartFieldsSnippet.andWithPrefix(String pathPrefix, List<FieldDescriptor> additionalDescriptors) Returns a newRequestFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.final ResponseFieldsSnippetResponseFieldsSnippet.andWithPrefix(String pathPrefix, List<FieldDescriptor> additionalDescriptors) Returns a newResponseFieldsSnippetconfigured with this snippet's attributes and its descriptors combined with the givenadditionalDescriptors.static List<FieldDescriptor>PayloadDocumentation.applyPathPrefix(String pathPrefix, List<FieldDescriptor> descriptors) Creates a copy of the givendescriptorswith the givenpathPrefixapplied to their paths.byte[]FieldPathPayloadSubsectionExtractor.extractSubsection(byte[] payload, org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) default byte[]PayloadSubsectionExtractor.extractSubsection(byte[] payload, org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Extracts a subsection of the givenpayloadthat has the givencontentTypeand that is described by the givendescriptors.static FieldTypeResolverFieldTypeResolver.forContentWithDescriptors(byte[] content, org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Create aFieldTypeResolverfor the givencontentandcontentType, described by the givendescriptors.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetPayloadDocumentation.relaxedRequestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.relaxedRequestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.relaxedResponseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operations's request payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's request payload.static RequestFieldsSnippetPayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields in the subsection of the API operations's request payload extracted by the givensubsectionExtractor.static RequestFieldsSnippetPayloadDocumentation.requestFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the subsection of the API operation's request payload extracted by the givensubsectionExtractor.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static RequestPartFieldsSnippetPayloadDocumentation.requestPartFields(String part, PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the specifiedpartof the API operations's request payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.static ResponseFieldsSnippetPayloadDocumentation.responseFields(PayloadSubsectionExtractor<?> subsectionExtractor, Map<String, Object> attributes, List<FieldDescriptor> descriptors) Returns aSnippetthat will document the fields of a subsection of the API operation's response payload.Constructor parameters in org.springframework.restdocs.payload with type arguments of type FieldDescriptorModifierConstructorDescriptionprotectedAbstractFieldsSnippet(String name, String type, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newAbstractFieldsSnippetthat will produce a snippet named<name>-fieldsusing a template named<type>-fields.protectedAbstractFieldsSnippet(String name, String type, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields, PayloadSubsectionExtractor<?> subsectionExtractor) Creates a newAbstractFieldsSnippetthat will produce a snippet named<name>-fieldsusing a template named<type>-fields.protectedAbstractFieldsSnippet(String type, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newAbstractFieldsSnippetthat will produce a snippet named<type>-fieldsusing a template named<type>-fields.protectedAbstractFieldsSnippet(String type, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields, PayloadSubsectionExtractor<?> subsectionExtractor) Creates a newAbstractFieldsSnippetthat will produce a snippet named<type>-fieldsusing a template named<type>-fields.protectedRequestFieldsSnippet(List<FieldDescriptor> descriptors) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestFieldsSnippet(List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestFieldsSnippet(List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestFieldsSnippet(List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Creates a newRequestFieldsSnippetthat will document the fields in the subsection of the request extracted by the givensubsectionExtractorusing the givendescriptors.protectedRequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newRequestFieldsSnippetthat will document the fields in the subsection of the request extracted by the givensubsectionExtractorusing the givendescriptors.protectedRequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newRequestFieldsSnippetthat will document the fields in the subsection of the request extracted by the givensubsectionExtractorusing the givendescriptors.protectedRequestFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newRequestFieldsSnippetthat will document the fields in the subsection of the request extracted by the givensubsectionExtractorusing the givendescriptors.protectedRequestPartFieldsSnippet(String partName, List<FieldDescriptor> descriptors) Creates a newRequestPartFieldsSnippetthat will document the fields in the request part using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newRequestPartFieldsSnippetthat will document the fields in the request part using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newRequestFieldsSnippetthat will document the fields in the request using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Creates a newRequestPartFieldsSnippetthat will document the fields in a subsection of the request part using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newRequestPartFieldsSnippetthat will document the fields in a subsection the request part using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newRequestPartFieldsSnippetthat will document the fields in a subsection of the request part using the givendescriptors.protectedRequestPartFieldsSnippet(String partName, PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newRequestPartFieldsSnippetthat will document the fields in a subsection of the request part using the givendescriptors.protectedResponseFieldsSnippet(List<FieldDescriptor> descriptors) Creates a newResponseFieldsSnippetthat will document the fields in the response using the givendescriptors.protectedResponseFieldsSnippet(List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newResponseFieldsSnippetthat will document the fields in the response using the givendescriptors.protectedResponseFieldsSnippet(List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newResponseFieldsSnippetthat will document the fields in the response using the givendescriptors.protectedResponseFieldsSnippet(List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newResponseFieldsSnippetthat will document the fields in the response using the givendescriptors.protectedResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors) Creates a newResponseFieldsSnippetthat will document the fields in a subsection of the response using the givendescriptors.protectedResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, boolean ignoreUndocumentedFields) Creates a newResponseFieldsSnippetthat will document the fields in the subsection of the response using the givendescriptors.protectedResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes) Creates a newResponseFieldsSnippetthat will document the fields in a subsection of the response using the givendescriptors.protectedResponseFieldsSnippet(PayloadSubsectionExtractor<?> subsectionExtractor, List<FieldDescriptor> descriptors, Map<String, Object> attributes, boolean ignoreUndocumentedFields) Creates a newResponseFieldsSnippetthat will document the fields in a subsection of the response using the givendescriptors.