Skip to content

Variable discovery and validation improvements #94

Closed

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.

Activity

  1. added a commit that references this issue on Aug 11, 2025
    587931c
  2. added a commit that references this issue on Aug 12, 2025
    9b67a92
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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