Uploaded image for project: 'Magnolia'
  1. Magnolia
  2. MAGNOLIA-6178

Add support for Map format in YAML files for definitions that expect a List

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Fixed
    • Icon: Neutral Neutral
    • 5.4.1
    • 5.4
    • configuration
    • None
    • Sprint 4 (Basel)
    • 3

      In the config app, the user works with a simple hierarchy that is configured the same when a definition expects a list or a map. node2bean handles this conversion.

      But yaml configuration must currently respect the definition of a list or a map and must use dashes for a list.

      This creates an additional hurdle for a developer working with configuration. For someone used to Magnolia - or someone referencing the existing body of knowledge on the internet - including documentation - an example of a "config app configuration" will not contain enough information to know how to configure a YAML file. The user will either have to know about the difference, and also have to consult the definition of the bean.

      To remove this barrier to development, and to simplify documentation & training efforts, I suggest that the yaml parsing/map2bean system should accept the map configuration style (a simple hierarchy in the file with the parent being the <name> property) even when the definition expects a list.


      • Attached files with an HTML component dialog in actual and proposed variants - plus linkList.yaml which I include just as an example of somewhere a user might expect a list - that is actually a map. (the kind of thing that will confuse users)

      (Note: Magnolia does not allow same name siblings, so our configuration style does not require a list. https://documentation.magnolia-cms.com/display/DOCS/Node+types#Nodetypes-Samenamesiblingsarenotallowed)

        Acceptance criteria

          1. html.dialog-actual.yaml
            0.9 kB
          2. html.dialog-proposed.yaml
            0.9 kB
          3. linkList.yaml
            0.5 kB

              apchelintcev Aleksandr Pchelintcev
              czimmermann Christopher Zimmermann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Task DoD

                    Estimated:
                    Original Estimate - Not Specified
                    Not Specified
                    Remaining:
                    Remaining Estimate - 0d
                    0d
                    Logged:
                    Time Spent - 0.5d
                    0.5d