5

Context

I am writing client code to access Web API REST service. I am using typed client classes by using Visual Studio 2015 "Add"/"REST API client..."

Now the serverside API changed and I would like to update my generated client code accordingly.

Question

Besides of the obvious solution of deleting all the generated classes, then starting the Visual Studio 2015 "Add"/"REST API client..." from ground zero, is there any better way to do this?

g.pickardou
  • 32,346
  • 36
  • 123
  • 268
  • Did you find an answer to your question? I guess the re-create option is available without using Autorest (`Add->REST Api` from Project context menu in `Solution Explorer`), so I was thinking that Autorest is for re-generating Client code (but have not found how to do that yet) is that not so? – Prokurors Nov 12 '16 at 20:20
  • Unfortunately not... – g.pickardou Nov 13 '16 at 15:23
  • 1
    AutoRest per se is just a command line tool (see https://github.com/Azure/autorest/blob/master/docs/user/cli.md for usage), so regenerating files is technically no problem. However, I'm not sure about the Visual Studio integration (i.e. how it specifically calls AutoRest), but it's probably easy to find out, there aren't too many options – olydis Nov 16 '16 at 06:43
  • 1
    Btw, tried out just to repeat `Add->Rest API client` from Solution Explorer (without removing previously generated REST API client) and it **did** regenerate client code... That is better than removing previous client manually and generating. – Prokurors Nov 16 '16 at 12:15
  • One more thing - for me `Add->REST API client` is not working when App service authentication is on (AAD in my case) - but when I switch it off - then client code is regenerated – Prokurors Nov 16 '16 at 21:37

0 Answers0