Skip to content

bregctl init writes JSON into files named .yaml #1258

Description

@jeremi

Problem

bregctl init writes registry.yaml and tests/journeys.yaml as JSON documents, byte for byte,
with a .yaml extension. Hand-authored projects in the same fixture set (the facility fixture's
registry.yaml, Casework's casework.yaml, module files) are real YAML, so the inconsistency is
in the generator rather than in what the loader accepts.

Cost

registry.yaml is the first file an adopter opens after bregctl init, and the file they are
expected to edit by hand.

  1. No comments. JSON has no comment syntax, so a new project cannot record why a field is set
    the way it is, in the one file most likely to need that.
  2. Editor tooling misreads it. Tools key off the extension and offer YAML behaviour over JSON
    content.
  3. It teaches the dialect. Everyone starting from the template inherits JSON style, so real
    projects drift away from the documented YAML examples.

Request

Have init emit actual YAML, ideally with comments on the fields a new project is expected to
change.

Found against origin/main at ec0573f3d, binaries 0.32.0-dev.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions