Add ActionController and Swagger support
Updated `ReC.API.csproj` to include `Swashbuckle.AspNetCore` (v6.6.2) for Swagger/OpenAPI documentation. Removed an unused `<ItemGroup>` referencing the `Controllers\` folder.
Added a new `ActionController` with a `[Route("api/[controller]")]` and `[ApiController]` attributes. Introduced a `Trigger` HTTP POST endpoint that accepts a `profileId` parameter. The method is currently unimplemented and throws a `NotImplementedException`.
This commit is contained in:
parent
3f5d3a8c08
commit
b6000a56d6
15
src/ReC.API/Controllers/ActionController.cs
Normal file
15
src/ReC.API/Controllers/ActionController.cs
Normal file
@ -0,0 +1,15 @@
|
|||||||
|
using Microsoft.AspNetCore.Mvc;
|
||||||
|
|
||||||
|
namespace ReC.API.Controllers;
|
||||||
|
|
||||||
|
[Route("api/[controller]")]
|
||||||
|
[ApiController]
|
||||||
|
public class ActionController : ControllerBase
|
||||||
|
{
|
||||||
|
[HttpPost("{profileId}")]
|
||||||
|
public Task<IActionResult> Trigger([FromRoute] int profileId)
|
||||||
|
{
|
||||||
|
// Implementation for retrieving actions would go here.
|
||||||
|
throw new NotImplementedException();
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -10,8 +10,4 @@
|
|||||||
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.6.2" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
<ItemGroup>
|
|
||||||
<Folder Include="Controllers\" />
|
|
||||||
</ItemGroup>
|
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user