You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I think this would make every single return meaningful, such that developers could identify code paths that actually respond to the request simpler, rather than having them search for status code being set, or not, earlier.
The text was updated successfully, but these errors were encountered:
Context
For methods such as DELETE, PATCH, PUT and POST, we are often met with the need of just returning a response code.
Having a helper method landing after #80 (returning a
*Response
) directly means that we are obliged to either return something like(we will go with
openapi
as the generated package name)Or to write the status code directly, similarly to this code @diamondburned refactored.
Proposal
Generating a function to help with this
Which would turn this situation into
I think this would make every single return meaningful, such that developers could identify code paths that actually respond to the request simpler, rather than having them search for status code being set, or not, earlier.
The text was updated successfully, but these errors were encountered: