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
-
objectTypeScriptClientGenerator
- Implements
Fields
LanguageName
The name of this target language.
public const string LanguageName = "typescript"
Field Value
Properties
Language
The canonical name of the target language, e.g. csharp.
public string Language { get; }
Property Value
Methods
CreateOptions(string)
Creates an options object for this target language with its defaults applied.
public ClientGenerationOptions CreateOptions(string serviceName)
Parameters
serviceNamestringThe service name to use for the entry endpoint.
Returns
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
documentOpenApiDocumentThe OpenAPI/Swagger document to generate a client for.
optionsClientGenerationOptionsOptions controlling the generation. May be an instance created by CreateOptions(string).
logIGenerationLogCollects messages about aspects of the document that the target language cannot express.