Skip to content

Singleton as a List of NestedTypes? #446

@indeox

Description

@indeox

Is there a way to define a singleton as a list of nested types?

For example, say you have a YML which only has a list of objects at the root level (no keys, just items):

# categories.yml

- id: categoryA
  name: Category A

- id: categoryB
  name: CategoryB

- id: categoryC
  name: Category C

Doesn't look like there's a way to define that document as-is.

It's not really a big deal though, as the YML could be modified to put the list inside a named key as a workaround.

# categories.yml

categories:
  - id: categoryA
    name: Category A
  
  - id: categoryB
    name: CategoryB
  
  - id: categoryC
    name: Category C

It's possibly not be a very common use-case though.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions