Base solution for your next web application
Starts in:
01 DAYS
01 HRS
01 MIN
01 SEC
Open Closed

.Net Core Angular 2 Version Swagger GET not passing paras #2258


User avatar
0
michaelhilgers created

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)
  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    michaelhilgers created

    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?

  • User Avatar
    0
    ismcagdas created
    Support Team

    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.

  • User Avatar
    0
    michaelhilgers created

    Hi

    ok, thanks for give me update.