Skip to content

Commit

Permalink
Revert default of AllowNullableBodyParameters back to true, #1719
Browse files Browse the repository at this point in the history
  • Loading branch information
RicoSuter committed Nov 8, 2018
1 parent b67c159 commit 154ebab
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,7 @@ public string InfoVersion
[Argument(Name = "Startup", IsRequired = false, Description = "The Startup class type in the form 'assemblyName:fullTypeName' or 'fullTypeName'.")]
public string StartupType { get; set; }

[Argument(Name = "AllowNullableBodyParameters", IsRequired = false, Description = "Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available, default: false).")]
[Argument(Name = "AllowNullableBodyParameters", IsRequired = false, Description = "Nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true).")]
public bool AllowNullableBodyParameters
{
get => Settings.AllowNullableBodyParameters;
Expand Down
4 changes: 2 additions & 2 deletions src/NSwag.SwaggerGeneration/SwaggerGeneratorSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@ public SwaggerGeneratorSettings()
/// <summary>Gets or sets the Swagger specification version.</summary>
public string Version { get; set; } = "1.0.0";

/// <summary>Gets or sets a value indicating whether nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available, default: false).</summary>
public bool AllowNullableBodyParameters { get; set; } = false;
/// <summary>Gets or sets a value indicating whether nullable body parameters are allowed (ignored when MvcOptions.AllowEmptyInputInBodyModelBinding is available (ASP.NET Core 2.0+), default: true).</summary>
public bool AllowNullableBodyParameters { get; set; } = true;

/// <summary>Gets the operation processor.</summary>
[JsonIgnore]
Expand Down

0 comments on commit 154ebab

Please sign in to comment.