| Visual Studio | Visual Studio Code | JetBrains Rider | |
|---|---|---|---|
| Status | released v0.0.2 | exploring extensibility options | exploring extensibility options |
| Supported versions | VS2017/2019 | TBD | TBD |
Note a lovely ❤️ Sponsor button with available options at the top of this page. Your support is much appreciated!
API Client Generation Tools for Visual Studio is a Visual Studio extension to generate C# and TypeScript HttpClient code for OpenAPI (formerly Swagger API) web service with NSwag toolchain.
Simply put, it does the same as Add Service Reference for WCF or Add Web Reference - for WSDL, but now it is for JSON API, you can put it anywhere in your project and it can generate C# amd TypeScript.
Install from Tools -> Extensions and Updates menu inside Visual Studio or download as VSIX package from Visual Studio Marketplace
- To get started - from
Solution Explorer->Add->New Item...->PetStore.nswagto yourC#project. - Use NSwagStudio - a Windows desktop app for configuring .nswag settings visually.
- Configure Visual Studio to automatically open .nswag files in NSwagStudio: in right click on .nswag file in Solution Explorer -> Open With... -> Add -> extension to NSwagStudio app.
- To regenerate code quickly just select .nswag file and press CTRL+S.
- If code is not generated check .nswag file
Custom Toolin Property Window. There is should beNswagCodeGenerator. You can just add it manually or selectGenerate API Clientin context menu.
- Request How-To you need.
See the changelog for the further development plans and version history.
Please feel free to request a feature or report a bug.