Beginner API/Swagger help. C# Rest client generated from online tool.

25 views
Skip to first unread message

Ben Moulton

unread,
Dec 6, 2017, 9:45:47 AM12/6/17
to Swagger
Hey, 

Have a set of API already finished api controllers in our main project, I was asked to use Swagger to generate the description of the API, by going to (website).com/swagger/docs/v1 ect. Then put it through the swagger online tool to generate a c# rest client which seemed to work fine. I've just added a simple console application to that project it generated and want to write some examples of consuming those rest api methods. 

My questions are pretty much: 

How do I go about doing the above? 

Is there a best way? 

How do I authenticate these requests? On swagger ui, you just put the bearer - 'apikey' in, not sure how to do similar in the console application. 

But yeah, never worked with web api before or swagger so any help greatly appreciated. 

Thanks! 
Reply all
Reply to author
Forward
0 new messages