Skip to content

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

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

helt
Copy link
Contributor

@helt helt commented Aug 31, 2024

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?

Copy link

changeset-bot bot commented Aug 31, 2024

🦋 Changeset detected

Latest 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

@helt helt force-pushed the fixes/swr-mutations-key-fn branch from 0ce0397 to b854a17 Compare August 31, 2024 20:23
Copy link

codecov bot commented Aug 31, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.21%. Comparing base (41d1746) to head (a8e4d37).
Report is 8 commits behind head on main.

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.
📢 Have feedback on the report? Share it here.

@helt
Copy link
Contributor Author

helt commented Aug 31, 2024

fixes #1177

@stijnvanhulle stijnvanhulle changed the base branch from main to v2 August 31, 2024 21:18
@stijnvanhulle stijnvanhulle changed the base branch from v2 to main August 31, 2024 21:18
@stijnvanhulle
Copy link
Collaborator

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).

@stijnvanhulle stijnvanhulle merged commit 1aede94 into kubb-labs:main Sep 1, 2024
8 checks passed
@helt helt deleted the fixes/swr-mutations-key-fn branch September 3, 2024 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants