Uploaded image for project: 'Hippo CMS'
  1. Hippo CMS
  2. CMS-12835

Support PageModelAnyGetter annotation similar to JsonAnyGetter

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Normal
    • Resolution: Fixed
    • None
    • 14.2.0, 100.2.0
    • site-toolkit
    • None
    • 0.25
    • Quasar
    • Puma Sprint 229

    Description

      In HSTTWO-4748 we are adding to HippoBean something like

      public Map<String, Object> getContributorMap() { 
           // return some map of objects populated by contributors which can be added
           // by downstream projects
      }
      

      However, typically what we do need is that this contributor map gets its keys get serialized as sibling of the normal getters!!! Therefor we need behavior similar to @JsonAnyGetter (which again is similar to @JsonUnwrapped but then for a Map). See [1]

      We need similar behavior, therefor introduce support for

      @PageModelAnyGetter
      public Map<String, Object> getContributorMap() { 
           // return some map of objects populated by contributors which can be added
           // by downstream projects
      }
      

      where PageModelAnyGetter should behave as JsonAnyGetter

      [1] https://fasterxml.github.io/jackson-annotations/javadoc/2.6/com/fasterxml/jackson/annotation/JsonAnyGetter.html

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aschrijvers Ard Schrijvers
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: