Interface FieldTypeResolver
public interface FieldTypeResolver
Resolves the type of a field in a request or response payload.
- Since:
- 2.0.3
- Author:
- Mathias Düsterhöft, Andy Wilkinson
-
Method Summary
Modifier and TypeMethodDescriptionstatic FieldTypeResolver
forContentWithDescriptors
(byte[] content, org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Create aFieldTypeResolver
for the givencontent
andcontentType
, described by the givendescriptors
.resolveFieldType
(FieldDescriptor fieldDescriptor) Resolves the type of the field that is described by the givenfieldDescriptor
based on the content of the payload.
-
Method Details
-
forContentWithDescriptors
static FieldTypeResolver forContentWithDescriptors(byte[] content, org.springframework.http.MediaType contentType, List<FieldDescriptor> descriptors) Create aFieldTypeResolver
for the givencontent
andcontentType
, described by the givendescriptors
.- Parameters:
content
- the payload that theFieldTypeResolver
should handlecontentType
- the content type of the payloaddescriptors
- the descriptors of the content- Returns:
- the
FieldTypeResolver
-
resolveFieldType
Resolves the type of the field that is described by the givenfieldDescriptor
based on the content of the payload.- Parameters:
fieldDescriptor
- the field descriptor- Returns:
- the type of the field
-