Open yangbocheng opened 12 hours ago
The reason to not use the [ApiController] is : Need manual validate some form fields, or api parameters in Project OpenApi won't Contains those Controllers If the Controller not starts with [ApiController] Attribute
<ItemGroup>
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="9.0.0" />
<PackageReference Include="Scalar.AspNetCore" Version="1.2.36" />
</ItemGroup>
so if remove the [ApiController] from Test1Controller.cs , then this won't show in openapi/v1.json
Is there an existing issue for this?
Describe the bug
Simply create a newest NET 9 aspnetcore webapi, then add
Microsoft.AspNetCore.OpenApi
andScalar.AspNetCore
. Then add a new Controller without [ApiController], this contoller's actions won't be included in openapi jsonExpected Behavior
Controllers without [ApiController] should be included in openapi json
Steps To Reproduce
No response
Exceptions (if any)
No response
.NET Version
NET 9
Anything else?
No response