lakani / OpenCore

OpenCore , an accounting system
1 stars 0 forks source link

for Web API add different actions or Method #83

Open lakani opened 8 months ago

lakani commented 8 months ago

DOTNET enable the same Controller to have for same HTTP Method more than one action for example for the controller (ACCTClass) there could be the following actions

HttpGet : /v1/api/OpenCore/system/Objects/ACCTClass/Get HttpGet : /v1/api/OpenCore/system/Objects/ACCTClass/Preview HttpPost : /v1/api/OpenCore/system/Objects/ACCTClass/PostNewAcctClass

the route is defined as the following : [Route("v1/api/OpenCore/system/Objects/ACCTClass/[action]")]

an example in the code SIS.OpenCore.Server\Controllers\ACCTClassController.cs

and the link for stackoverflow article https://stackoverflow.com/questions/54267137/actions-require-unique-method-path-combination-for-swagger

we need to apply this on all Controllers