logo
Project
Version

NSwag

Since all communication to server made via AJAX requests, we are using a client side javascript layer to call server API. It's automatically generated by nswag tool using swagger. ASP.NET Zero solution is properly configured for nswag. When you change your server side services, all you need to do is to run nswag/refresh.bat file (or run the command inside it for a non-Windows OS) while server side (.Host project) is running.

Generated code is located in shared/service-proxies/service-proxies.ts file. You should not make manual change in this file since it will be overwritten on the next code generation.

Refreshing Service Proxies

While Nswag automatically generate proxy files, it does not refresh service-proxies.module.ts. If you add a new service, you should manually add it to this file as like others.

In this document