Skip to content

Commit

Permalink
Expose AllowEmptyValue in ParameterModelBase (#4145)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshWoodArup authored Sep 16, 2022
1 parent e2a1283 commit e31a48d
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/NSwag.CodeGeneration/Models/ParameterModelBase.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
//-----------------------------------------------------------------------

using System;
using NJsonSchema;
using NJsonSchema.CodeGeneration;
using System.Collections.Generic;
using System.Linq;
using NJsonSchema;
using NJsonSchema.CodeGeneration;

namespace NSwag.CodeGeneration.Models
{
Expand Down Expand Up @@ -211,6 +211,9 @@ public IEnumerable<PropertyModel> CollectionPropertyNames
/// <summary>Gets a value indicating whether the parameter is supplied through the request headers.</summary>
public bool IsHeader => Kind == OpenApiParameterKind.Header;

/// <summary>Gets a value indicating whether the parameter allows empty values.</summary>
public bool AllowEmptyValue => _parameter.AllowEmptyValue;

/// <summary>Gets the operation extension data.</summary>
public IDictionary<string, object> ExtensionData => _parameter.ExtensionData;
}
Expand Down

0 comments on commit e31a48d

Please sign in to comment.