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
Methods
CreateOptions(string)
Creates an options object for this target language with its defaults applied.
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.
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.