Infrastructure
Unchase OpenAPI (Swagger) Connected Service is a Visual Studio 2017/2019/2022 extension to generate C#
(TypeScript
) HttpClient
(or C#
Controllers
) code for OpenAPI
(formerly Swagger API
) web service with NSwag.
Starting from Visual Studio Community 2019 v16.1.3 extensions based on
Microsoft Connected Services
now work fine.
The project is developed and maintained by Nikolay Chebotov (Unchase).
Install from Tools -> Extensions and Updates
menu inside Visual Studio 2017 (for VisualStudio 2019: Extensions -> Manage Extensions
) or download as VSIX
package from VSGallery or download as VSIX
package from Visual Studio Marketplace:
Status | Value |
---|---|
Build | |
Buid History | |
GitHub Release | |
GitHub Release Date | |
GitHub Release Downloads | |
VS Marketplace | |
VS Marketplace Downloads | |
VS Marketplace Installs |
C#
or TypeScript
clients/proxies (client code) from Swagger 2.0 and OpenAPI 3.0 specificationsC#
ASP.NET Controller from Swagger 2.0 and OpenAPI 3.0 specificationsC#
or TypeScript
clients/proxies (client code) or ASP.NET Controller from OData specification converted to OpenAPI based on OpenAPI.NET.OData.nswag
file for using in NSwagStudio
(no need to install for generating)C#
client (before generating):
C#
controller (before generating):
.nswag
and .nswag.json
files in NSWagStudio.nswag.json
specification file with another .nswag.json
specification file (or specification given by endpoint
)Meaning of the Unchase OpenAPI (Swagger) Connected Service settings according to NSwagStudio:
Since v1.4.0 you can exclude type names in separate Window for C# client code generation:
Since v1.5.0 you can generate code from OData specification converted to OpenAPI specification:
Open in NSwagStudio
CommandSince v1.1.* have been added menu command embedded in Visual Studio Solution Explorer context menu lets you open generated .nswag
and .nswag.json
files in NSwagStudio.
This extension is for those times where you generate .nswag
and .nswag.json
files and you want to be able to quickly open it in NSwagStudio.
In order to use this extension, you must have Visual Studio 2017/2019, this connected service as well as NSwagStudio installed.
You can open .nswag
and .nswag.json
files in NSWagStudio by simply right-clicking it in Solution Explorer and select Open in NSwagStudio:
If you installed NSwagStudio at a non-default location, a prompt will ask for the path to NSwagStudio.exe
.
You can always change the location in Tools -> Options -> Web -> Unchase OpenAPI (Swagger) Connected Service:
Compare OpenAPI-specifications...
CommandSince v1.2.* have been added menu command embedded in Visual Studio Solution Explorer context menu lets you compare generated .nswag.json
specification-file with another .nswag.json
specification-file (or with specification given by endpoint
).
This extension is for those times where you generate .nswag.json
file and you want to quickly compare it with another specification or specification given by endpoint
.
In order to use this extension, you must have Visual Studio 2017/2019 as well as this connected service.
You can compare .nswag.json
specification-file with another .nswag.json
specification-file (or with specification given by endpoint
) by simply selecting one or two files and right-clicking them in Solution Explorer and select Compare OpenAPI-specifications...:
Endpoint
You can always change the specification Endpoint to compare with in Tools -> Options -> Web -> Unchase OpenAPI (Swagger) Connected Service:
.nswag
file in NSwagStudio
(Windows GUI for editing .*nswag files).nswag
file in NSwagStudio
for the same API service link and check the differencesConnected Services
restored in the v16.1.3 update to Visual Studio 2019.See the changelog for the further development plans and version history.
Please feel free to add your review, request a feature, ask a question or report a bug including in connected service:
Thank you in advance!
If you like what I am doing and you would like to thank me, please consider:
Thank you for your support!
Copyright © 2019 Nikolay Chebotov (Unchase) - Provided under the Apache License 2.0.