Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to update REST API Client from a Swagger file in Visual Studio

How do I update a REST API Client from a Swagger file in Visual Studio? I created my REST API Client via the "Add -> REST API Client" menu option when right-clicking on the project. See screenshot below. I now have an updated version of the Swagger file and need to also update the auto-generated client code. How do I do this in Visual Studio?

I have not been able to find a way to update the auto-generated code without completely deleting the code first and then re-adding the REST API Client. I am looking for something similar to the "Update Service Reference" functionality for a WSDL.

Add REST API Client menu option Add REST API Client popup

like image 296
Justin Pityk Avatar asked Aug 03 '16 18:08

Justin Pityk


1 Answers

The menu option seems to be poorly named, but the act of Adding a REST API client actually overwrites/updates an existing client.

like image 75
Louie Avatar answered Oct 24 '22 12:10

Louie