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)
-
0
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.
-
0
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.
-
0
Yes, i do. I use AngularJS 1, ASP.NET MVC, and WebAPI
-
0
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();