Exemple #1
0
 /// <summary>
 /// OpenApi描述
 /// </summary>
 /// <param name="options">选项</param>
 public OpenApiDoc(OpenApiDocOptions options)
     : this(GetDocument(options.OpenApi))
 {
     if (string.IsNullOrEmpty(options.Namespace) == false)
     {
         this.Settings.NameSpace = options.Namespace;
         this.Settings.CSharpGeneratorSettings.Namespace = options.Namespace;
     }
 }
Exemple #2
0
        static void Main(string[] args)
        {
            var options = new OpenApiDocOptions();

            if (Parser.Default.ParseArguments(args, options))
            {
                var doc = new OpenApiDoc(options);
                doc.GenerateFiles();
            }
            else
            {
                Console.Read();
            }
        }