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

msw plugin #1614

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from
Draft

msw plugin #1614

wants to merge 4 commits into from

Conversation

mrlubos
Copy link
Member

@mrlubos mrlubos commented Jan 23, 2025

Closes #1486

  • ability to override response or parts of it (separate argument for success/error?), needs to be type-safe
  • ability to specify number of array items (dot based notation for granular selection?)
  • ability to skip optional arguments (aka minimal response), offer the opposite (ridiculous amount of array items, additional object properties, etc)
  • move response type behind debug flag (makes life easier as there'll be no need to import TypeScript enums and fight with File type or overridden interfaces)

Copy link

stackblitz bot commented Jan 23, 2025

Review PR in StackBlitz Codeflow Run & review this pull request in StackBlitz Codeflow.

Copy link

changeset-bot bot commented Jan 23, 2025

⚠️ No Changeset found

Latest commit: 67d8678

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link

vercel bot commented Jan 23, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
hey-api-docs ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 3:38am

Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 20.11070% with 433 lines in your changes missing coverage. Please review.

Project coverage is 55.48%. Comparing base (3d17490) to head (67d8678).

Files with missing lines Patch % Lines
packages/openapi-ts/src/plugins/msw/plugin.ts 17.00% 166 Missing ⚠️
packages/openapi-ts/src/plugins/msw/schema.ts 11.18% 127 Missing ⚠️
packages/openapi-ts/src/plugins/msw/interfaces.ts 16.66% 105 Missing ⚠️
packages/openapi-ts/src/plugins/msw/response.ts 30.43% 32 Missing ⚠️
packages/openapi-ts/src/plugins/msw/config.ts 83.33% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1614      +/-   ##
==========================================
- Coverage   56.26%   55.48%   -0.79%     
==========================================
  Files         158      164       +6     
  Lines       24875    25407     +532     
  Branches     1816     1816              
==========================================
+ Hits        13997    14096      +99     
- Misses      10868    11301     +433     
  Partials       10       10              
Flag Coverage Δ
unittests 55.48% <20.11%> (-0.79%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

pkg-pr-new bot commented Jan 23, 2025

Open in Stackblitz

npm i https://pkg.pr.new/hey-api/openapi-ts/@hey-api/openapi-ts@1614

commit: dbe4e0d

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.

MSW plugin
1 participant