Skip to content
This repository has been archived by the owner on Dec 14, 2018. It is now read-only.

Provide consistent experience of status code in api description when an action returns a DTO vs void #4838

Closed
kichalla opened this issue Jun 9, 2016 · 4 comments
Assignees

Comments

@kichalla
Copy link
Member

kichalla commented Jun 9, 2016

Current Behavior
For this action an apidescription would have status code information as 200 OK

public Product Get()

For this action we do NOT provide a response type description(which contains status code info)

public void DoSomething()

From here:
#4831 (comment)

cc @rynowak

@Eilon
Copy link
Member

Eilon commented Jun 13, 2016

Should void result in a 204 status code automatically?

@rynowak
Copy link
Member

rynowak commented Jun 13, 2016

This breaks the MVC. We tried this earlier

Suggestion here is to do 200 by default because that's the actual default. More discussion here: domaindrivendev/Swashbuckle.AspNetCore#97

@Eilon
Copy link
Member

Eilon commented Jun 13, 2016

Ah sure.

@Eilon
Copy link
Member

Eilon commented Oct 7, 2016

@jbagga - please remove "Working" and add "Done" - thanks!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants