Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: schema naming for generics + package types #195

Merged
merged 1 commit into from
Jan 3, 2024

Conversation

danielgtaylor
Copy link
Owner

Updates the default schema naming function to support generics using types defined in other packages, such as the included test example using SchemaGeneric[time.Time]. The JSON names and paths generated in the schema are now valid and documentation renders correctly.

Fixes #189

Copy link

codecov bot commented Jan 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (7d204a1) 93.40% compared to head (79ec95d) 93.41%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #195   +/-   ##
=======================================
  Coverage   93.40%   93.41%           
=======================================
  Files          17       17           
  Lines        2169     2172    +3     
=======================================
+ Hits         2026     2029    +3     
  Misses        105      105           
  Partials       38       38           

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

@danielgtaylor danielgtaylor merged commit 57554dc into main Jan 3, 2024
5 checks passed
@danielgtaylor danielgtaylor deleted the generic-module-namer branch January 3, 2024 05:50
qdongxu added a commit to qdongxu/huma that referenced this pull request Jan 4, 2024
PR danielgtaylor#195 fixed ISSUE danielgtaylor#198. But regex matched a shorter string when a generic parammeter is an slice( that means there's embedded brackets).
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.

Response Body can not be recognised in other directory and package
1 participant