Skip to content

fix: Surface the Body field's example tag as the request body media - #1101

Open
SillyZir wants to merge 2 commits into
danielgtaylor:mainfrom
SillyZir:auto-fix/991
Open

fix: Surface the Body field's example tag as the request body media#1101
SillyZir wants to merge 2 commits into
danielgtaylor:mainfrom
SillyZir:auto-fix/991

Conversation

@SillyZir

Copy link
Copy Markdown

Fixes #991.

Surface the Body field's example tag as the request body media type example in setRequestBodyFromBody, since it previously only landed as an ignored $ref-sibling in the schema.

Files: huma.go

@codecov

codecov Bot commented Aug 17, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.20%. Comparing base (9d0a320) to head (40a59c8).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1101   +/-   ##
=======================================
  Coverage   93.20%   93.20%           
=======================================
  Files          23       23           
  Lines        4988     4990    +2     
=======================================
+ Hits         4649     4651    +2     
  Misses        272      272           
  Partials       67       67           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

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.

Is there a simpler solution to add an example to the requestBody?

1 participant