Skip to content

Variable discovery and validation improvements #94

@httpdss

Description

@httpdss

Summary
Template variables are discovered via Jinja parsing and prompted, but type/validation enforcement is minimal.

Proposed changes

  • Support types (string, number, boolean) from config variables and coerce/validate inputs.
  • Add validators: regex, min/max, enum.
  • Add default-from-env and required flags.
  • Add --vars-file path.yaml to supply variables as YAML (parallel to --mappings-file).

Files

  • struct_module/template_renderer.py
  • struct_module/commands/generate.py
  • docs/template-variables.md, docs/configuration.md

Acceptance criteria

  • Variables are validated/coerced according to type and constraints.
  • --vars-file works and merges with --vars.
  • Clear error messages when validation fails; tests included.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions