Table of Contents

Class TypeScriptClientGenerator

Namespace
TypedRest.CodeGeneration.TypeScript
Assembly
TypedRest.CodeGeneration.TypeScript.dll

Generates the source code of a TypeScript TypedRest client.

public class TypeScriptClientGenerator : IClientGenerator
Inheritance
object
TypeScriptClientGenerator
Implements

Fields

LanguageName

The name of this target language.

public const string LanguageName = "typescript"

Field Value

string

Properties

Language

The canonical name of the target language, e.g. csharp.

public string Language { get; }

Property Value

string

Methods

CreateOptions(string)

Creates an options object for this target language with its defaults applied.

public ClientGenerationOptions CreateOptions(string serviceName)

Parameters

serviceName string

The service name to use for the entry endpoint.

Returns

ClientGenerationOptions

Generate(OpenApiDocument, ClientGenerationOptions, IGenerationLog?)

Generates the source files of a client for document.

public IEnumerable<IGeneratedFile> Generate(OpenApiDocument document, ClientGenerationOptions options, IGenerationLog? log = null)

Parameters

document OpenApiDocument

The OpenAPI/Swagger document to generate a client for.

options ClientGenerationOptions

Options controlling the generation. May be an instance created by CreateOptions(string).

log IGenerationLog

Collects messages about aspects of the document that the target language cannot express.

Returns

IEnumerable<IGeneratedFile>