rbeauchamp / Swashbuckle.OData

Extends Swashbuckle with OData v4 support!
Other
128 stars 96 forks source link

Incorrect specifications for global actions and functions #145

Closed riley-van-hengstum closed 4 years ago

riley-van-hengstum commented 7 years ago

The following global action definition:

var action = builder
    .Action("RegisterEmployee")
    .ReturnsFromEntitySet<Employee>("Employees");

action.Parameter<string>("UserEmail");
action.Parameter<string>("EmployeeEmail");

results in two separate parameters instead of the expected body parameter:

odata-action


The following global function definition:

var function = builder
    .Function("GetEmployeeForRegistration")
    .ReturnsFromEntitySet<Employee>("Employees");

function.Parameter<string>("UserEmail");
function.Parameter<string>("EmployeeEmail");

gives two operations instead of one:

odata-function

cibergarri commented 7 years ago

Hi Jaap!

Could it be caused because you have a ODataRoute placed in the method?? Try to remove it, it should work anyway.

Regards.