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 Details

    • forContentWithDescriptors

      static FieldTypeResolver forContentWithDescriptors(byte[] content, MediaType contentType, List<FieldDescriptor> descriptors)
      Create a FieldTypeResolver for the given content and contentType, described by the given descriptors.
      Parameters:
      content - the payload that the FieldTypeResolver should handle
      contentType - the content type of the payload
      descriptors - the descriptors of the content
      Returns:
      the FieldTypeResolver
    • resolveFieldType

      Object resolveFieldType(FieldDescriptor fieldDescriptor)
      Resolves the type of the field that is described by the given fieldDescriptor based on the content of the payload.
      Parameters:
      fieldDescriptor - the field descriptor
      Returns:
      the type of the field