forked from loafle/openapi-generator-original
[aspnetcore] Typo issues in docs and generated code (#7094)
* fixed a typo issue in aspnetcore generator #4829 * solved an issue with integration tests using WebApplicationFactory * updated aspnetcore samples impacted by the change
This commit is contained in:
@@ -18,7 +18,7 @@ sidebar_label: aspnetcore
|
||||
|modelClassModifier|Model Class Modifier can be nothing or partial| |partial|
|
||||
|newtonsoftVersion|Version for Microsoft.AspNetCore.Mvc.NewtonsoftJson for ASP.NET Core 3.0+| |3.0.0|
|
||||
|operationIsAsync|Set methods to async or sync (default).| |false|
|
||||
|operationModifier|Operation Modifier can be virtual, abstract or partial| |virtual|
|
||||
|operationModifier|Operation Modifier can be virtual or abstract| |virtual|
|
||||
|operationResultTask|Set methods result to Task<>.| |false|
|
||||
|packageAuthors|Specifies Authors property in the .NET Core project file.| |OpenAPI|
|
||||
|packageCopyright|Specifies an AssemblyCopyright for the .NET Framework global assembly attributes stored in the AssemblyInfo file.| |No Copyright|
|
||||
|
||||
@@ -70,7 +70,7 @@ public class AspNetCoreServerCodegen extends AbstractCSharpCodegen {
|
||||
protected CliOption swashbuckleVersion = new CliOption(SWASHBUCKLE_VERSION, "Swashbuckle version: 3.0.0, 4.0.0, 5.0.0");
|
||||
protected CliOption aspnetCoreVersion = new CliOption(ASPNET_CORE_VERSION, "ASP.NET Core version: 3.1, 3.0, 2.2, 2.1, 2.0 (deprecated)");
|
||||
private CliOption classModifier = new CliOption(CLASS_MODIFIER, "Class Modifier can be empty, abstract");
|
||||
private CliOption operationModifier = new CliOption(OPERATION_MODIFIER, "Operation Modifier can be virtual, abstract or partial");
|
||||
private CliOption operationModifier = new CliOption(OPERATION_MODIFIER, "Operation Modifier can be virtual or abstract");
|
||||
private CliOption modelClassModifier = new CliOption(MODEL_CLASS_MODIFIER, "Model Class Modifier can be nothing or partial");
|
||||
private boolean generateBody = true;
|
||||
private CliOption buildTarget = new CliOption("buildTarget", "Target to build an application or library");
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace {{packageName}}
|
||||
/// <param name="args"></param>
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -22,7 +22,7 @@ namespace {{packageName}}
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns>IHostBuilder</returns>
|
||||
public static IHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
@@ -30,4 +30,4 @@ namespace {{packageName}}
|
||||
.UseUrls("http://0.0.0.0:{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}/");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Org.OpenAPITools
|
||||
/// <param name="args"></param>
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -22,7 +22,7 @@ namespace Org.OpenAPITools
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns>IHostBuilder</returns>
|
||||
public static IHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
@@ -30,4 +30,4 @@ namespace Org.OpenAPITools
|
||||
.UseUrls("http://0.0.0.0:8080/");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ namespace Org.OpenAPITools
|
||||
/// <param name="args"></param>
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
CreateWebHostBuilder(args).Build().Run();
|
||||
CreateHostBuilder(args).Build().Run();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
@@ -22,7 +22,7 @@ namespace Org.OpenAPITools
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns>IHostBuilder</returns>
|
||||
public static IHostBuilder CreateWebHostBuilder(string[] args) =>
|
||||
public static IHostBuilder CreateHostBuilder(string[] args) =>
|
||||
Host.CreateDefaultBuilder(args)
|
||||
.ConfigureWebHostDefaults(webBuilder =>
|
||||
{
|
||||
@@ -30,4 +30,4 @@ namespace Org.OpenAPITools
|
||||
.UseUrls("http://0.0.0.0:8080/");
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user