Skip to content

Conversation

@mgabeler-lee-6rs
Copy link
Contributor

When generating types for a set of schemas with deeply nested refs across several subdirectories, it can fail due to not joining the parent file's base path (directory).

The properly qualified path was already computed, just need to use it!

@codecov
Copy link

codecov bot commented Jan 29, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 45.88%. Comparing base (d963216) to head (6a63f7b).
Report is 195 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##             main     #375       +/-   ##
===========================================
- Coverage   76.58%   45.88%   -30.71%     
===========================================
  Files          24       56       +32     
  Lines        1892     5551     +3659     
===========================================
+ Hits         1449     2547     +1098     
- Misses        354     2763     +2409     
- Partials       89      241      +152     

☔ View full report in Codecov by Sentry.
📢 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.

@omissis omissis added this to the v0.19.0 milestone May 4, 2025
@omissis omissis force-pushed the fix-qualified-ref-following branch 3 times, most recently from 38c25e3 to 6a63f7b Compare May 4, 2025 15:03
@omissis omissis removed this from the v0.19.0 milestone May 4, 2025
@omissis omissis force-pushed the fix-qualified-ref-following branch from 6a63f7b to 9528ffd Compare May 4, 2025 15:44
@codecov
Copy link

codecov bot commented May 4, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@b9a4d3b). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #375   +/-   ##
=======================================
  Coverage        ?   42.16%           
=======================================
  Files           ?       61           
  Lines           ?     6602           
  Branches        ?        0           
=======================================
  Hits            ?     2784           
  Misses          ?     3546           
  Partials        ?      272           

☔ View full report in Codecov by Sentry.
📢 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.

@mgabeler-lee-6rs mgabeler-lee-6rs marked this pull request as ready for review May 5, 2025 19:05
@omissis
Copy link
Owner

omissis commented May 10, 2025

@mgabeler-lee-6rs can you please provide some examples and/or testcases here?

@omissis omissis marked this pull request as draft May 11, 2025 09:34
@mgabeler-lee-6rs
Copy link
Contributor Author

I'll dig up something proper, but the rough issue IIRC is with $Ref pointing at a local file in a subdirectory

@omissis omissis force-pushed the fix-qualified-ref-following branch from 9528ffd to 755bd50 Compare May 13, 2025 04:59
@mgabeler-lee-6rs mgabeler-lee-6rs force-pushed the fix-qualified-ref-following branch from 755bd50 to b444fbd Compare May 21, 2025 21:00
@mgabeler-lee-6rs
Copy link
Contributor Author

mgabeler-lee-6rs commented May 21, 2025

@omissis I was able to narrow down my production case that broke on this to a fairly minimal reproducer as a test case. You can cherry-pick the test over to main and see how it fails. It's a bit of an uncommon scenario, using a $ref and overriding some things (e.g. description).

While paths are involved, it doesn't require the $ref to point to a subdir, it only requires the tool to not be run in the same folder as the schema, which is the way the tests already run 🙂

@mgabeler-lee-6rs mgabeler-lee-6rs marked this pull request as ready for review May 21, 2025 21:01
@omissis
Copy link
Owner

omissis commented May 31, 2025

I will take a look, thanks @mgabeler-lee-6rs

@omissis omissis force-pushed the fix-qualified-ref-following branch from b444fbd to 4351740 Compare October 18, 2025 15:23
@omissis omissis added this to the v0.21.0 milestone Oct 18, 2025
@omissis omissis merged commit 4b5de3c into omissis:main Oct 18, 2025
3 checks passed
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