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

feat: add response helper to resolver info #41

Merged
merged 16 commits into from
May 17, 2024

Conversation

christoph-fricke
Copy link
Owner

Missing stuff / Open questions are marked with "TODO" in the source code.

Copy link

changeset-bot bot commented Feb 17, 2024

🦋 Changeset detected

Latest commit: 6cc56f9

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 Minor

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

@jrestall
Copy link

Any help needed on this @christoph-fricke? openapi-msw is brilliant and exactly what we need as we upgrade to MSW v2. Enforcing the correct status codes appears to be the only gap.

@christoph-fricke
Copy link
Owner Author

@jrestall Thank you so much for the kinds words. Feedback like this already helps a lot.
Lately I didn't have much time and energy to finish this, but I am planning to get back to it shortly after easter. I definitely want to get this feature out of the door as it is the last big missing piece.

If you like to provide some help, I always appreciate feedback on the API design. :)
I have outlined some alternatives in this comment.
A colleague of mine also proposed a higher-level API that focuses on the semantics of each status code, i.e. returning something like response.notFound(...) instead of response(404).text(...). My feeling is that it is a bit too high level as OpenAPI specs also define the status code and not the intended meaning behind them. What do you think?

@christoph-fricke christoph-fricke marked this pull request as ready for review May 16, 2024 21:26
@christoph-fricke christoph-fricke merged commit fe70d20 into main May 17, 2024
1 check passed
@christoph-fricke christoph-fricke deleted the feat/response-helper branch May 17, 2024 20:16
@github-actions github-actions bot mentioned this pull request May 17, 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.

2 participants