Example #1
0
        static void Main(string[] args)
        {
            var apiGenerator = new ApiGeneratorService();

            using (var provider = new ApiDescriptionProvider <Startup>())
            {
                apiGenerator.AddApiDescriptionGroupCollection(provider.ApiDescriptionGroups);
            }
            var flat = apiGenerator.GenerateFlatApi();

            using (var sw = new StreamWriter("index.ts"))
            {
                var writer = new TypeWriter();
                writer.WriteApi(flat, sw);
                var initialWriter = new InitialValueWriter();
                initialWriter.WriteApi(flat, sw);
                sw.Close();
            }
        }