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: proper type inference for extended json mime types #63

Merged
merged 6 commits into from
Sep 10, 2024

Conversation

christoph-fricke
Copy link
Owner

This PR fixes a problem with type inference for extended json mime types, such as application/problem+json. Previously OpenAPI-MSW would not catch such mime-types and would infer that an endpoint should not receive or return JSON. Thus response(...).json would be typed as never. Now, it will be typed with the proper JSON response.

Copy link

changeset-bot bot commented Sep 10, 2024

🦋 Changeset detected

Latest commit: e55748f

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
openapi-msw Patch

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

@christoph-fricke christoph-fricke merged commit b9f4bea into main Sep 10, 2024
1 check passed
@christoph-fricke christoph-fricke deleted the fix/json-like-type branch September 10, 2024 20:21
@github-actions github-actions bot mentioned this pull request Sep 10, 2024
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.

1 participant