Skip to content

Commit a4ea02f

Browse files
Merge pull request #963 from microsoft/mk/fix-example-with-empty-property-name
Treat an empty property name as valid
2 parents 398f1a2 + 8bb1a19 commit a4ea02f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/Microsoft.OpenApi/Writers/OpenApiWriterBase.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -393,9 +393,9 @@ private bool IsScopeType(ScopeType type)
393393
/// <param name="name">property name</param>
394394
protected void VerifyCanWritePropertyName(string name)
395395
{
396-
if (string.IsNullOrWhiteSpace(name))
396+
if (name == null)
397397
{
398-
throw Error.ArgumentNullOrWhiteSpace(nameof(name));
398+
throw Error.ArgumentNull(nameof(name));
399399
}
400400

401401
if (Scopes.Count == 0)

0 commit comments

Comments
 (0)