-
Notifications
You must be signed in to change notification settings - Fork 32
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(dynamite): Support default responses #1051
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does this handle having both a status code and a default response specified?
I think we really have to make the status code validation taka a function that uses a switch case. This would also allow us to handle status code ranges.
It is handled the same way as we currently do for multiple status codes: As long as they have the same schema they will be handled the same. If we have a default response then we can ignore if we have other status codes with the same schema because they will be handled by the default already. |
419da46
to
9e34f0e
Compare
The please also add a test that handles this (having both a default and a status code) |
9e34f0e
to
83c7db7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
You'll need to rebase as I just merged #1025. |
Signed-off-by: jld3103 <[email protected]>
Signed-off-by: jld3103 <[email protected]>
83c7db7
to
ef7ff10
Compare
Closes #871
I had this laying around from the petstore example. Might as well merge it already now that we have tests for dynamite.