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

Swagger & ABP #3244


User avatar
0
mrvithan created

I am trying to use Swagger to create an WebAPI document. but have to luck to start it. Any help to get me start ?

Thx.


4 Answer(s)
  • User Avatar
    0
    justinp created

    Within the client side (UI) project, there is a folder called 'nswag.' Inside there is a file 'refresh.bat.'

    **While your server-side (API) project is running,**run 'refresh.bat.' This will update the file 'service-proxies.ts' in the client side (UI) project.

    I hope this helps.

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi @mrvithan,

    Do you use any of ABP templates ? If so, can you share which one ? Angular1, Angular2, jQuery with ASP.NET MVC or jQuery with ASP.NET Core ?

    Thanks.

  • User Avatar
    0
    mrvithan created

    Yes, i do. I use AngularJS 1, ASP.NET MVC, and WebAPI

  • User Avatar
    0
    ismcagdas created
    Support Team

    Hi,

    We have used this library <a class="postlink" href="https://github.com/domaindrivendev/Swashbuckle">https://github.com/domaindrivendev/Swashbuckle</a> for ASP.NET MVC version. You just need to add a nuget reference to this package and then configure it in your WebApi module's Initialize method.

    Configuration.Modules.AbpWebApi().HttpConfiguration
        .EnableSwagger(c =>
        {
            c.SingleApiVersion("v1", "MyCompanyName.AbpZeroTemplate.WebApi");
            c.ResolveConflictingActions(apiDescriptions => apiDescriptions.First());
        })
        .EnableSwaggerUi();