Example #1
0
        internal override string RenderFile(string clientCode)
        {
            var template = LoadTemplate("File");

            template.Add("namespace", Namespace);
            template.Add("toolchain", SwaggerService.ToolchainVersion);
            template.Add("clients", clientCode);
            template.Add("classes", _resolver.GenerateTypes());
            return(template.Render());
        }
Example #2
0
        internal override string RenderFile(string clientCode)
        {
            var template = LoadTemplate("File");

            template.Add("namespace", Settings.CSharpGeneratorSettings.Namespace);
            template.Add("toolchain", SwaggerService.ToolchainVersion);
            template.Add("clients", Settings.GenerateClientClasses ? clientCode : string.Empty);
            template.Add("namespaceUsages", Settings.AdditionalNamespaceUsages ?? new string[] {});
            template.Add("classes", Settings.GenerateDtoTypes ? _resolver.GenerateTypes() : string.Empty);
            return(template.Render());
        }