Exemple #1
0
 static void Main(string[] args)
 {
     Parser.Default.ParseArguments <OpenApiDocOptions>(args)
     .WithParsed(options =>
     {
         var doc = new OpenApiDoc(options);
         doc.GenerateFiles();
     })
     .WithNotParsed(errors =>
     {
         errors.Output();
     });
 }
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();
            }
        }
Exemple #3
0
 /// <summary>
 /// HttpModel提供者
 /// </summary>
 /// <param name="swagger"></param>
 public HttpModelProvider(OpenApiDoc swagger)
     : base(swagger.Document, swagger.Settings.CSharpGeneratorSettings, swagger.resolver)
 {
     this.swagger = swagger;
 }
Exemple #4
0
 /// <summary>
 /// HttpApi提供者
 /// </summary>
 /// <param name="openApi"></param>
 public HttpApiProvider(OpenApiDoc openApi)
     : base(openApi.Document, openApi.Settings, openApi.resolver)
 {
     this.openApi = openApi;
 }