Skip to content

We’re currently experiencing delays in the validation process. Publishing your extension may take longer than usual. We’re actively working to resolve the delay - thank you for your patience.

| Marketplace
Sign in
Visual Studio>Tools>RestEase Client Code Generator
RestEase Client Code Generator

RestEase Client Code Generator

Stef Heyenrath

|
888 installs
| (0) | Free
Generate a RestEase compatible client based on a Swagger / OpenAPI or RAML specification.
Download

RestEase Client Generator

A Visual Studio Extension to generate a RestEase compatible client (Interface & Models) based on a Swagger / OpenApi or RAML specification.

Features

  • Supports Visual Studio 2017 and 2019
  • Add New RestEase API Client to a project from an OpenAPI specification URL (e.g https://petstore.swagger.io/v2/swagger.json)
  • Define custom namespace for the generated file
  • Auto-updating of generated code file when changes are made to the specification file (.json, .yml, .yaml, .raml)

Custom Tools

  • RestClientCodeGenerator - Generates a single file C# RestEase Client Interface and Models.

Dependencies

This Visual Studio Extension will automatically add the required nuget packages that the generated code depends on.

Example

Input Yaml file 'PetStore.yaml'

Excerpt...

paths: /pet: post: tags: - pet summary: Add a new pet to the store description: '' operationId: addPet consumes: - application/json - application/xml produces: - application/xml - application/json parameters: - in: body name: body description: Pet object that needs to be added to the store required: true schema: $ref: '#/definitions/Pet' 

(Full example).

Generate file 'PetStore.cs'

Excerpt...

namespace RestEaseClientGeneratorConsoleApp.PetStoreJson.Api { public interface IPetStoreApi { /// <summary> /// Add a new pet to the store /// </summary> /// <param name="pet">A pet for sale in the pet store</param> [Post("/pet")] Task AddPetAsync([Body] Pet pet); // More methods ... } } namespace RestEaseClientGeneratorConsoleApp.PetStoreJson.Models { public class Pet { public long Id { get; set; } // More properties ... } } 

(Full example).

Create a Client and call methods

var petStoreApi = RestClient.For<IPetStoreApi>("https://petstore.swagger.io/v2"); var findPetsByTags = await petStoreApi.FindPetsByTagsAsync(new[] { "cat" }); 

Screenshots

Add new specification and generate client code

Add from OpenAPI Specification Enter URL to OpenAPI Specification

Generate client code for existing .json, .yml or .yaml file

Solution Explorer Context Menus

Options

See https://github.com/StefH/RestEase-Client-Generator/wiki/Options

Credits

  • Project source code is based on REST API Client Code Generator
  • Code used from https://raw.githubusercontent.com/andeart/CaseConversions/master/CaseConversions/CaseConversion.cs
  • Code used from https://www.codeproject.com/articles/6294/description-enum-typeconverter
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft