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

[http-server-csharp] OkResponse is generated as a model #5001

Closed
ArcturusZhang opened this issue Nov 7, 2024 · 1 comment · Fixed by #5140
Closed

[http-server-csharp] OkResponse is generated as a model #5001

ArcturusZhang opened this issue Nov 7, 2024 · 1 comment · Fixed by #5140
Assignees
Labels

Comments

@ArcturusZhang
Copy link
Member

ArcturusZhang commented Nov 7, 2024

We have an operation that just returns 200 without body content:

op hello(): OkResponse;

usually we write this in a way that the op returns void, but because of this issue , I cannot do it.

In the generation result, OkResponse is generated as an empty model, this should not happen especially the operation with OkResponse
is generated as this without a return body type:

public interface ISayHi
{
    Task HelloAsync();
}
@markcowl
Copy link
Contributor

Generally, void is synonymous with 204

@markcowl markcowl added the bug Something isn't working label Nov 11, 2024
@markcowl markcowl added this to the [2024] December milestone Nov 11, 2024
@markcowl markcowl self-assigned this Nov 19, 2024
markcowl added a commit to markcowl/cadl that referenced this issue Nov 21, 2024
markcowl added a commit to markcowl/cadl that referenced this issue Nov 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants