/// <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; } }
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(); } }