这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@danielgtaylor
Copy link
Owner

This PR makes it possible to provide a custom request schema along with a body by preventing Huma from overwriting any existing schema for the default content type.

Copilot AI review requested due to automatic review settings February 15, 2025 23:53
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

@codecov
Copy link

codecov bot commented Feb 15, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 92.78%. Comparing base (af68f0e) to head (8894fbf).
Report is 5 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #727      +/-   ##
==========================================
+ Coverage   92.77%   92.78%   +0.01%     
==========================================
  Files          22       22              
  Lines        5051     5062      +11     
==========================================
+ Hits         4686     4697      +11     
  Misses        314      314              
  Partials       51       51              

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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

Comments suppressed due to low confidence (1)

huma.go:1027

  • The indentation and structure of the conditional checks should be improved for readability and to prevent logic errors. Ensure that the checks for 'op.RequestBody.Content[contentType] == nil' and 'op.RequestBody.Content[contentType].Schema == nil' are clearly separated and properly indented.
if op.RequestBody.Content[contentType] == nil {

@danielgtaylor danielgtaylor merged commit 169da69 into main Feb 15, 2025
7 checks passed
@danielgtaylor danielgtaylor deleted the custom-request-schema branch February 15, 2025 23:56
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.

2 participants