Hi
I m using .Net Core Angular2 version. Swagger GET not passing parameters to API function.
example: <a class="postlink" href="http://localhost:22742/swagger/ui/index.html#!/AuditLog/ApiServicesAppAuditLogGetAuditLogsGet">http://localhost:22742/swagger/ui/index ... ditLogsGet</a> In the GET /api/services/app/AuditLog/GetAuditLogs swagger does not pass parameters to the API function.
Thanks for help
4 Answer(s)
-
0
Hi,
We know this issue and we suggest you to test your API using PostMan Google Chrome extension. See <a class="postlink" href="https://aspnetzero.com/Documents/Development-Guide-Core#token-based-authentication">https://aspnetzero.com/Documents/Develo ... entication</a>
As an alternative, you can apply the solution provided in below issue. <a class="postlink" href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/151">https://github.com/domaindrivendev/Swas ... issues/151</a>
In this way, you need to first get a token using "/api/TokenAuth/Authenticate" then include that token in your other requests.
-
0
Hi
and when i call a api get function wich doesnt need authentification token, the function parameters are also not passed.. I think the problem is not the authentication?
-
0
You are right, it seems like Swashbuckle does not send get parameters. I found this issue <a class="postlink" href="https://github.com/domaindrivendev/Swashbuckle.AspNetCore/issues/47">https://github.com/domaindrivendev/Swas ... /issues/47</a>, but when I try to update Swashbuckle, it didn't worked for me at all. I will try this and let you know as soon as possible.
In the mean time, you can use PostMan.
-
0
Hi
ok, thanks for give me update.