Skip to content

Document custom template data with a runnable Huma example - #329

Open
jihtsan wants to merge 1 commit into
abice:masterfrom
jihtsan:codex/295-document-template-data
Open

jihtsan wants to merge 1 commit into
abice:masterfrom
jihtsan:codex/295-document-template-data

Conversation

@jihtsan

@jihtsan jihtsan commented Oct 19, 2026 •

Copy link
Copy Markdown

Custom templates are mentioned but their available variables and external imports are not documented. List the per-enum and header data contexts and exported enum fields, then provide a complete string-enum Huma schema template using a conditional description. Explain the header override and required --values option.

Closes #295.

Validation: extracted the template and source directly from the README, generated and compiled them with Go 1.25.5 and Huma v2.39.1, and asserted the schema type, allowed values and description. Also checked the no-comment fallback and quoted descriptions. git diff --check passed. This is a README-only change; the full generator suite and other Go/platform versions were not rerun for it.

Summary by CodeRabbit

  • Documentation
    • Added a Custom templates section covering template ordering and syntax, available data contexts, and a Huma schema example for string enums.

@jihtsan
jihtsan requested a review from abice as a code owner October 19, 2026 10:37
@coderabbitai

coderabbitai Bot commented Oct 19, 2026

Copy link
Copy Markdown

Review in Change Stack →

Note

Currently processing new changes in this PR. This may take a few minutes, please wait...

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: fede112c-a23f-4378-9665-2658b4857712
📥 Commits

Reviewing files that changed from the base of the PR and between ad6b63d and 33561cf.

📒 Files selected for processing: 1
  • README.md
+------------------------------------------+
| The GIL can't stop these rabbit threads. |
+------------------------------------------+
  \
   \     /)/)
        ( '')
        /  |
      o(___)
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

docs: Document custom templates variables

1 participant