All Projects â†’ unchase â†’ Unchase.OpenAPI.Connectedservice

unchase / Unchase.OpenAPI.Connectedservice

Licence: Apache-2.0 license
📜 Visual Studio extension to generate OpenAPI (Swagger) web service reference.

Programming Languages

C#
18002 projects
powershell
5483 projects

Projects that are alternatives of or similar to Unchase.OpenAPI.Connectedservice

Unchase.Odata.Connectedservice
📜 A Visual Studio extension for connecting to OData services with generating client-side C# proxy-classes
Stars: ✭ 39 (-43.48%)
Mutual labels:  visual-studio, vsix, scaffolding, visual-studio-extension, vsix-extensions
openapi-petstore
The pet store sample
Stars: ✭ 35 (-49.28%)
Mutual labels:  openapi, openapi3, openapi-codegen
light-rest-4j
A RESTful framework built on top of light-4j with both Swagger 2.0 and OpenAPI 3.0 supports
Stars: ✭ 113 (+63.77%)
Mutual labels:  openapi, openapi3, openapi-codegen
vsixbootstrapper
An installer that can be chained with other packages to locate the latest VSIXInstaller.exe to use for installing VSIX extensions.
Stars: ✭ 19 (-72.46%)
Mutual labels:  visual-studio, vsix, vsix-extensions
ogen
OpenAPI v3 code generator for go
Stars: ✭ 436 (+531.88%)
Mutual labels:  openapi, openapi3, openapi-codegen
openapi-eller
Generate OpenAPI v3 clients and servers from the command line
Stars: ✭ 19 (-72.46%)
Mutual labels:  openapi, openapi3, openapi-codegen
sbt-openapi-schema
Generate schema sources for Scala, Java and Elm from an openapi 3.0 spec.
Stars: ✭ 12 (-82.61%)
Mutual labels:  openapi, openapi3, openapi-codegen
fastify-openapi-glue
A plugin for Fastify to autogenerate a configuration based on a OpenApi(v2/v3) specification.
Stars: ✭ 94 (+36.23%)
Mutual labels:  openapi, openapi3, openapi-codegen
OptionsSample
A Visual Studio extension sample
Stars: ✭ 14 (-79.71%)
Mutual labels:  visual-studio, vsix, visual-studio-extension
Codist
A visual studio extension which enhances syntax highlighting, quick info (tooltip), navigation bar, scrollbar, display quality and brings smart tool bar to code editor.
Stars: ✭ 134 (+94.2%)
Mutual labels:  visual-studio, vsix, visual-studio-extension
OpenAPI
A pharo implementation of OpenAPI 3.0.1
Stars: ✭ 20 (-71.01%)
Mutual labels:  openapi, openapi3, openapi-client
Openapi Connected Service
Visual Studio extension to generate OpenAPI (Swagger) web service reference.
Stars: ✭ 57 (-17.39%)
Mutual labels:  visual-studio, openapi, visual-studio-extension
Community.VisualStudio.Toolkit
Making it easier to write Visual Studio extensions
Stars: ✭ 165 (+139.13%)
Mutual labels:  visual-studio, vsix, visual-studio-extension
auto-save-vs-extension
An extension that automatically saves the file as you're working on it.
Stars: ✭ 30 (-56.52%)
Mutual labels:  visual-studio, visual-studio-extension
swaggie
Tool for generating TypeScript services for given Swagger API endpoints
Stars: ✭ 18 (-73.91%)
Mutual labels:  openapi, nswag
swagger-converter
OpenAPI/Swagger 2.0 to OpenAPI 3.0 Converter WebService
Stars: ✭ 58 (-15.94%)
Mutual labels:  openapi, openapi3
BuiltinCmd
VS extension that provide a built-in terminal window for CMD or Powershell.
Stars: ✭ 30 (-56.52%)
Mutual labels:  visual-studio, visual-studio-extension
openapi
OpenAPI 3 Specification for golang
Stars: ✭ 18 (-73.91%)
Mutual labels:  openapi, openapi3
vsSolutionBuildEvent
🎛 Event-Catcher with variety of advanced Actions to service projects, libraries, build processes, runtime environment of the Visual Studio, MSBuild Tools, and …
Stars: ✭ 66 (-4.35%)
Mutual labels:  visual-studio, vsix
whook
Build strong and efficient REST web services.
Stars: ✭ 18 (-73.91%)
Mutual labels:  openapi, openapi3

Logo

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).

Getting Started

Read How-To on medium.com

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:

Adding Unchase OpenAPI (Swagger) Connected Service in Visual Studio

Builds status

Status Value
Build Build status
Buid History Build history
GitHub Release GitHub release
GitHub Release Date GitHub Release Date
GitHub Release Downloads Github Releases
VS Marketplace VS Marketplace
VS Marketplace Downloads VS Marketplace Downloads
VS Marketplace Installs VS Marketplace Installs

Features

  • Generate C# or TypeScript clients/proxies (client code) from Swagger 2.0 and OpenAPI 3.0 specifications
  • Generate C# ASP.NET Controller from Swagger 2.0 and OpenAPI 3.0 specifications
  • Experimental: Generate C# or TypeScript clients/proxies (client code) or ASP.NET Controller from OData specification converted to OpenAPI based on OpenAPI.NET.OData
  • Generate .nswag file for using in NSwagStudio (no need to install for generating)
  • Add required dependencies for the C# client (before generating):
    • Library targeting .NET Standard 1.4+:
      1. Newtonsoft.Json (NuGet)
      2. System.Net.Http (NuGet)
      3. System.ComponentModel.Annotations (NuGet)
    • Library targeting the full .NET:
      1. Newtonsoft.Json (NuGet)
      2. System.Runtime.Serialization (GAC)
      3. System.ComponentModel.DataAnnotations (GAC)
    • Library targeting PCL 259 (Portable Class Library):
      1. Newtonsoft.Json (NuGet)
      2. Microsoft.Net.Http (NuGet)
      3. Portable.DataAnnotations (NuGet)
  • Add Required dependences for the C# controller (before generating):
    1. Microsoft.AspNetCore.Mvc (NuGet)
  • Command to open generated .nswag and .nswag.json files in NSWagStudio
  • Command to compare .nswag.json specification file with another .nswag.json specification file (or specification given by endpoint)
  • Storage of the last 10 endpoints (specification path)

Settings Meaning

Meaning of the Unchase OpenAPI (Swagger) Connected Service settings according to NSwagStudio:

Unchase OpenAPI (Swagger) Connected Service settings meaning

Exclude type names

Since v1.4.0 you can exclude type names in separate Window for C# client code generation:

Unchase OpenAPI (Swagger) Connected Service - exclude type names

Generate code from OData specification converted to OpenAPI specification

Since v1.5.0 you can generate code from OData specification converted to OpenAPI specification:

Unchase OpenAPI (Swagger) Connected Service - generate from OData

Custom Commands

Open in NSwagStudio Command

Since 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.

Prerequisite

In order to use this extension, you must have Visual Studio 2017/2019, this connected service as well as NSwagStudio installed.

Solution Explorer

You can open .nswag and .nswag.json files in NSWagStudio by simply right-clicking it in Solution Explorer and select Open in NSwagStudio:

Open in NSwagStudio menu Command

Path to NSwagStudio.exe

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:

Open in NSwagStudio Option

Compare OpenAPI-specifications... Command

Since 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.

Prerequisite

In order to use this extension, you must have Visual Studio 2017/2019 as well as this connected service.

Solution Explorer

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...:

Compare OpenAPI Specifications Command Compare OpenAPI Specifications Command

Path to the specification Endpoint

You can always change the specification Endpoint to compare with in Tools -> Options -> Web -> Unchase OpenAPI (Swagger) Connected Service:

Compare OpenAPI Specifications Option

Compare View

Compare OpenAPI Specifications Command result

HowTos

Troubleshooting

Can't open .nswag file in NSwagStudio

  • You can use Open in NSwagStudio menu command
  • If generated code corrupted, try to open .nswag file in NSwagStudio (Windows GUI for editing .*nswag files)
  • If it doesn't open, try to create new .nswag file in NSwagStudio for the same API service link and check the differences

Installation completes but I can't see the Service in the list of connected services (Visual Studio 2019)

Roadmap

See the changelog for the further development plans and version history.

Feedback

Please feel free to add your review, request a feature, ask a question or report a bug including in connected service:

Unchase OpenAPI Connected Service Report a Bug

Thank you in advance!

Thank me!

If you like what I am doing and you would like to thank me, please consider:

Buy me a coffe!

Thank you for your support!


Copyright © 2019 Nikolay Chebotov (Unchase) - Provided under the Apache License 2.0.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].