Skip to content
OrmikonPublic

About

The package with classes for generating TypeScript declarations and code

Resources

Stars

2 stars

Watchers

3 watching

Forks

Latest commit

 

History

66 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 

Repository files navigation

NetTypeS

The packages with classes for generating TypeScript declarations and code by WebApi for .Net Core and .Net Framework.

Installation

Download and install the package from NuGet:

    Install-Package Ormikon.NetTypeS.WebApi.Core
    Install-Package Ormikon.NetTypeS.WebApi.Framework

The following targets are available:

  • .NET Platform Standard 2.0

Getting Started

.Net Core usage:

class Program
{
    static void Main(string[] args)
    {
        var webHost = CoreWebExample.Program.BuildWebHost(args);
        var apiExplorer = webHost.Services.GetService<IApiDescriptionGroupCollectionProvider>();
        var generator = new WebApiCoreGenerator();
        var files = generator.GenerateAll(apiExplorer);
    }
}

.Net Framework usage:

class Program
{
    static void Main()
    {
        var config = new HttpConfiguration();
        WebApiConfig.Register(config);
        config.EnsureInitialized();
        var explorer = config.Services.GetApiExplorer();
        var generator = new WebApiFrameworkGenerator();
        var generatedResult = generator.GenerateAll(explorer);
    }
}

Examples

.Net Core:

.Net Framework:

About

The package with classes for generating TypeScript declarations and code

Resources

Stars

2 stars

Watchers

3 watching

Forks

Releases

Packages

Used by

Contributors

Languages