microsoft / microsoft/typespec

[http-server-csharp] extra blank lines are generated in the result

Open
#5,004 3 comments 0 reactions 0 assignees View on GitHub
emitter:service:csharp feature needs-area triaged:core
Dominant language
Java
Stars
5.9k
Forks
394
Avg merge
1d 23h
Merged PRs (30d)
104

Description

For instance in this generated code:
```csharp
[ApiController]
public abstract partial class SayHiControllerBase : ControllerBase
{

internal abstract ISayHi SayHiImpl { get; }

///
/// say hello
///
[HttpPost]
[Route("/sayHi/hello")]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(HelloContent))]
public virtual async Task Hello(HelloContent body)
{
var result = await SayHiImpl.HelloAsync(body);
return Ok(result);
}

[HttpPost]
[Route("/sayHi/world")]
[ProducesResponseType((int)HttpStatusCode.OK, Type = typeof(WorldResult))]
public virtual async Task World()
{
var result = await SayHiImpl.WorldAsync();
return Ok(result);
}

}
}
```
There are quite a few extra blank lines which produces warnings in the project.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.