-
-
Notifications
You must be signed in to change notification settings - Fork 87
Fixes/swr mutations key fn #1176
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
Conversation
🦋 Changeset detectedLatest commit: a8e4d37 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
0ce0397
to
b854a17
Compare
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #1176 +/- ##
=======================================
Coverage 75.21% 75.21%
=======================================
Files 136 136
Lines 10063 10064 +1
Branches 1677 1677
=======================================
+ Hits 7569 7570 +1
Misses 2484 2484
Partials 10 10 ☔ View full report in Codecov by Sentry. |
fixes #1177 |
Thanks for fixing this. Weird that the typescript check is not catching this. Do you have a playground/example where this was failing, I tried to reproduce this but the swagger you provided does not crash in the latest Kubb config. Maybe a mismatch of versions(we are using the latest typescript and swr version). |
The example oas provided in
e2e/schemas/dataset_api.yaml
demonstrates that generation of swr mutations result in typescript errors. I observed this behaviour when the key (the rest path) contains parameters.These are fixed when the swr type
Key
is used instead.Interestingly,
pnpm generate && pnpm typecheck
in e2e does not raise this. So this might be a bug on its own?