[MAGNOLIA-6178] Add support for Map format in YAML files for definitions that expect a List Created: 22/Apr/15 Updated: 23/Sep/15 Resolved: 28/Jul/15 |
|
| Status: | Closed |
| Project: | Magnolia |
| Component/s: | configuration |
| Affects Version/s: | 5.4 |
| Fix Version/s: | 5.4.1 |
| Type: | Improvement | Priority: | Neutral |
| Reporter: | Christopher Zimmermann | Assignee: | Aleksandr Pchelintcev |
| Resolution: | Fixed | Votes: | 0 |
| Labels: | None | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 0.5d | ||
| Original Estimate: | Not Specified | ||
| Attachments: |
|
||||||||
| Issue Links: |
|
||||||||
| Template: |
|
||||||||
| Acceptance criteria: |
Empty
|
||||||||
| Task DoD: |
[ ]*
Doc/release notes changes? Comment present?
[ ]*
Downstream builds green?
[ ]*
Solution information and context easily available?
[ ]*
Tests
[ ]*
FixVersion filled and not yet released
[ ] 
Architecture Decision Record (ADR)
|
||||||||
| Date of First Response: | |||||||||
| Epic Link: | Config by file / code | ||||||||
| Sprint: | Sprint 4 (Basel) | ||||||||
| Story Points: | 3 | ||||||||
| Description |
|
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.
(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) |
| Comments |
| Comment by Aleksandr Pchelintcev [ 28/Jul/15 ] |
|
I've made a test-shot on this issue today, the result is pushed to fix/
This seems to be what the N2B transformer's doing when setting a name property. |