VisualBean
4/14/2016 - 11:04 AM

Program.cs

using IO.Swagger.Api;
using IO.Swagger.Client;
using IO.Swagger.Model;

namespace SwaggerClientTest
{
    class Program
    {
        static void Main(string[] args)
        {
            //Create a new instance
            var clientConfig = new Configuration();
            //Add the username and password
            clientConfig.Username = "John";
            clientConfig.Password = "SecretPassword";
          
            //Pass the config through the api ctor
            var petApi = new PetApi(clientConfig);
            //Call the Api
            Pet pet = petApi.GetPetById(1);
        }
    }
}