Beispiel #1
0
        public ITemplate CreateTemplate(string language, string template, object model)
        {
            if (model is CSharpClientTemplateModel)
            {
                var visitor = new SwaggerVisitor().Visit(_swaggerDoc);

                return(new TempalteRenderer(_sink,
                                            _subsystem,
                                            _serviceName,
                                            visitor.Tags,
                                            visitor.Definitions,
                                            (CSharpClientTemplateModel)model));
            }

            return(new NullTemplateRenderer());
        }
 public async Task <CodeFile> GetCodeFileInternalAsync(string originalName, Stream stream, bool runAnalysis) =>
 SwaggerVisitor.GenerateCodeListing(originalName, await JsonDocument.ParseAsync(stream));