@@ -22,12 +22,12 @@ public class OpenApiOperation : IOpenApiSerializable, IOpenApiExtensible, IMetad
2222 /// </summary>
2323 public const bool DeprecatedDefault = false ;
2424
25- private HashSet < OpenApiTagReference > ? _tags ;
25+ private ISet < OpenApiTagReference > ? _tags ;
2626 /// <summary>
2727 /// A list of tags for API documentation control.
2828 /// Tags can be used for logical grouping of operations by resources or any other qualifier.
2929 /// </summary>
30- public HashSet < OpenApiTagReference > ? Tags
30+ public ISet < OpenApiTagReference > ? Tags
3131 {
3232 get
3333 {
@@ -74,7 +74,7 @@ public HashSet<OpenApiTagReference>? Tags
7474 /// The list MUST NOT include duplicated parameters. A unique parameter is defined by a combination of a name and location.
7575 /// The list can use the Reference Object to link to parameters that are defined at the OpenAPI Object's components/parameters.
7676 /// </summary>
77- public List < IOpenApiParameter > ? Parameters { get ; set ; }
77+ public IList < IOpenApiParameter > ? Parameters { get ; set ; }
7878
7979 /// <summary>
8080 /// The request body applicable for this operation.
@@ -111,14 +111,14 @@ public HashSet<OpenApiTagReference>? Tags
111111 /// This definition overrides any declared top-level security.
112112 /// To remove a top-level security declaration, an empty array can be used.
113113 /// </summary>
114- public List < OpenApiSecurityRequirement > ? Security { get ; set ; }
114+ public IList < OpenApiSecurityRequirement > ? Security { get ; set ; }
115115
116116 /// <summary>
117117 /// An alternative server array to service this operation.
118118 /// If an alternative server object is specified at the Path Item Object or Root level,
119119 /// it will be overridden by this value.
120120 /// </summary>
121- public List < OpenApiServer > ? Servers { get ; set ; }
121+ public IList < OpenApiServer > ? Servers { get ; set ; }
122122
123123 /// <summary>
124124 /// This object MAY be extended with Specification Extensions.
@@ -139,7 +139,7 @@ public OpenApiOperation() { }
139139 public OpenApiOperation ( OpenApiOperation operation )
140140 {
141141 Utils . CheckArgumentNull ( operation ) ;
142- Tags = operation . Tags != null ? [ .. operation . Tags ] : null ;
142+ Tags = operation . Tags != null ? new HashSet < OpenApiTagReference > ( operation . Tags ) : null ;
143143 Summary = operation . Summary ?? Summary ;
144144 Description = operation . Description ?? Description ;
145145 ExternalDocs = operation . ExternalDocs != null ? new ( operation . ExternalDocs ) : null ;
@@ -357,7 +357,7 @@ public virtual void SerializeAsV2(IOpenApiWriter writer)
357357 writer . WriteEndObject ( ) ;
358358 }
359359
360- private static HashSet < OpenApiTagReference > ? VerifyTagReferences ( HashSet < OpenApiTagReference > ? tags )
360+ private static ISet < OpenApiTagReference > ? VerifyTagReferences ( ISet < OpenApiTagReference > ? tags )
361361 {
362362 if ( tags ? . Count > 0 )
363363 {
0 commit comments