Can Swagger provide a way/template/code so that using it any end customer can directly call API in raw format and user do not required to download client code for e.g. C# to use in C# language?
At present, if my end customer want to use my API in his .net (C#) application then he has to do below steps. 1) First, need to download C# client code from swagger Editor which act as middle tier. <https://lh3.googleusercontent.com/-pa3dnlcqRUY/WOylB8R39sI/AAAAAAAABYc/jtcIaujtrY0TzWkBj9IXDM9Vw8WvPOj9ACLcB/s1600/Img1.png> <https://lh3.googleusercontent.com/-wkhNfUuGDy4/WOyl77UcBAI/AAAAAAAABYk/RUewBxyU_YY7VoNlulPth_Mnd49GJqapgCLcB/s1600/Img2.png> 2) Then generate Html2 client <https://lh3.googleusercontent.com/-HZrKkzOro5Q/WOyleYoaV2I/AAAAAAAABYg/67E6yyOJNrImVbPGMakSPkRyKO9CjwxjgCLcB/s1600/C%2523_Client.png> 3) copy provide code from Html2 client for C# language and paste it to his application to use API. using System; using System.Diagnostics; using IO.Swagger.Api; using IO. Swagger.Client; using IO.Swagger.Model; namespace Example { public class activeDevicesExample { public void main() { var apiInstance = new DeviceApi (); var status = 789; // Long | status of device based on that devices to be fetched try { // Find device by status Device result = apiInstance. activeDevices(status); Debug.WriteLine(result); } catch (Exception e) { Debug.Print("Exception when calling DeviceApi.activeDevices: " + e.Message ); } } } } We have requirement that end customer can directly copy and paste the API calling code and do not required to use the swagger server code as mentioned in step1. Reason: My APIs are used by multiple end customer already. If i go with Swagger editor then then need to change code in their application to use my template code Can any one correct my understanding if not correct and provide me the solution? -- You received this message because you are subscribed to the Google Groups "Swagger" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
