Automatically generate TypeScript client code for ASP.NET Core controllers

前端 未结 6 865
醉话见心
醉话见心 2021-01-30 18:23

I\'m searching for a way to automatically generate the TypesScript client code from a ASP.NET Core Web-Application (Currently using Visual Studio 2017RC and webpack).

Ar

6条回答
  •  失恋的感觉
    2021-01-30 18:38

    You can also take a look at autorest.typescript client code generator. It provides good interfaces for all the model definitions, accurately defines readonly properties and enums. It supports a bunch of custom extensions that can be useful to improve the user experience of the generated client. You can take a look at some generated sample clients.

    Bonus: The generated typescript client works in node.js and also in the browser.

提交回复
热议问题