Uploaded image for project: 'RESTEasy'
  1. RESTEasy
  2. RESTEASY-2411

resteasy-jackson2-provider: default white-list based PolymorphicTypeValidator extension

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Done
    • Icon: Critical Critical
    • 3.9.2.Final, 4.4.2.Final
    • None
    • None
    • None

      Now that Jackson 2.10 is used, we need to enable polymorphic type validators by default (to deal with the case of Default Typing being enabled through `@JsonTypeInfo` annotated classes).
      To do that we most likely need to:
      1) create a custom extension of `BasicPolymorphicTypeValidator` that register a white-list of FQCNs obtained through a system property (or through MP Config if available)
      2) set such validator in the ObjectMapper instances we create in the resteasy providers (`mapper.setPolymorphicTypeValidator(...)`)
      3) create a testcase verifying this
      4) provide additional documentation (about the property for white-list specification)

      Some references:

              rhn-support-asoldano Alessio Soldano
              rhn-support-asoldano Alessio Soldano
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: