Table of Contents

Interface IClientGenerator

Namespace
TypedRest.CodeGeneration.Generation
Assembly
TypedRest.CodeGeneration.dll

Generates the source code of a TypedRest client in a specific target language.

public interface IClientGenerator

Properties

Language

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

string Language { get; }

Property Value

string

Methods

CreateOptions(string)

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

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.

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>