Skip to content

Commit

Permalink
Remove empty list initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
MaggieKimani1 committed Sep 4, 2024
1 parent da3dfd9 commit e85dfd0
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
5 changes: 2 additions & 3 deletions src/Microsoft.OpenApi/Models/OpenApiDocument.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) Microsoft Corporation. All rights reserved.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.

using System;
Expand Down Expand Up @@ -48,8 +48,7 @@ public class OpenApiDocument : IOpenApiSerializable, IOpenApiExtensible, IOpenAp
/// <summary>
/// A declaration of which security mechanisms can be used across the API.
/// </summary>
public IList<OpenApiSecurityRequirement> SecurityRequirements { get; set; } =
new List<OpenApiSecurityRequirement>();
public IList<OpenApiSecurityRequirement> SecurityRequirements { get; set; }

/// <summary>
/// A list of tags used by the specification with additional metadata.
Expand Down
2 changes: 1 addition & 1 deletion src/Microsoft.OpenApi/Models/OpenApiOperation.cs
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ public class OpenApiOperation : IOpenApiSerializable, IOpenApiExtensible, IOpenA
/// This definition overrides any declared top-level security.
/// To remove a top-level security declaration, an empty array can be used.
/// </summary>
public IList<OpenApiSecurityRequirement> Security { get; set; } = new List<OpenApiSecurityRequirement>();
public IList<OpenApiSecurityRequirement> Security { get; set; }

/// <summary>
/// An alternative server array to service this operation.
Expand Down

0 comments on commit e85dfd0

Please sign in to comment.