Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[aspnetcore] Typo issues in docs and generated code #7094

Merged
merged 3 commits into from
Aug 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docs/generators/aspnetcore.md
Original file line number Diff line number Diff line change
Expand Up @@ -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|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ namespace {{packageName}}
/// <param name="args"></param>
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
CreateHostBuilder(args).Build().Run();
}

/// <summary>
/// Create the host builder.
/// </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 =>
{
webBuilder.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:{{#serverPort}}{{serverPort}}{{/serverPort}}{{^serverPort}}8080{{/serverPort}}/");
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ public class Program
/// <param name="args"></param>
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
CreateHostBuilder(args).Build().Run();
}

/// <summary>
/// Create the host builder.
/// </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 =>
{
webBuilder.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:8080/");
});
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,20 @@ public class Program
/// <param name="args"></param>
public static void Main(string[] args)
{
CreateWebHostBuilder(args).Build().Run();
CreateHostBuilder(args).Build().Run();
}

/// <summary>
/// Create the host builder.
/// </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 =>
{
webBuilder.UseStartup<Startup>()
.UseUrls("http://0.0.0.0:8080/");
});
}
}
}