Skip to content

Add "shortcuts" for Rocoto YAML to make it more concise for users. #630

@christinaholtNOAA

Description

@christinaholtNOAA

From PR 268 in SRW:
It is convenient, and valuable in terms of its simplicity that we can hand an attrs: block to a function that simply creates XML attributes for the block's children, knowing that the input config passed validation; but IIRC cyclestr supports only certain predefined attributes, so we could also match keys against those, creating XML attributes for the ones we know represent those, and setting the XML element's text to the value: key's value. Combined with a previous comment, we might then be able to simplify

cyclestr:
  value: val

to

cyclestr: val

and

cyclestr:
  attrs:
    offset: offsetval
  value: val

to

cyclestr:
  offset: offsetval
  value: val

We might also consider changing the value: tag to content: to match the XML spec.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Backlog

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions