-
Notifications
You must be signed in to change notification settings - Fork 677
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
Void with ResponseType attribute #344
Comments
This is a SB bug - just isnt handled because I never thought of the case where you would use ResponseType instead of void on the action signature. Simple fix ... will go out with next release |
In the meantime, you could do the following as a workaround ...
|
Should be resolved in latest release - 5.2.0 |
Thanks I needed this too! Great release! 👍 |
What about .NET Core version? It has no |
Take a look at the following snippet:
I expect the two operation to have the same result in the responses field.
Both should have:
But instead the Post operation gets the following:
This generates the following on swagger-ui:

Which is clearly wrong. I need the Post operation to have IHttpActionResult, so I can return with BadRequest() or Unauthorized() etc. That is why I used the ResponseType attribute to specify when it succeeds it should return 204 No content, without a schema reference.
How can I remove these strange "schema":{"$ref":"#/definitions/Void"} references from my operations?
The text was updated successfully, but these errors were encountered: