@@ -133,7 +133,7 @@ public class OpenApiSchema : IOpenApiSerializable, IOpenApiReferenceable, IOpenA
133
133
/// <summary>
134
134
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
135
135
/// </summary>
136
- public IList < string > Required { get ; set ; } = new List < string > ( ) ;
136
+ public ISet < string > Required { get ; set ; } = new HashSet < string > ( ) ;
137
137
138
138
/// <summary>
139
139
/// Follow JSON Schema definition: https://tools.ietf.org/html/draft-fge-json-schema-validation-00
@@ -393,7 +393,7 @@ public void SerializeAsV3WithoutReference(IOpenApiWriter writer)
393
393
/// </summary>
394
394
public void SerializeAsV2 ( IOpenApiWriter writer )
395
395
{
396
- SerializeAsV2 ( writer : writer , parentRequiredProperties : new List < string > ( ) , propertyName : null ) ;
396
+ SerializeAsV2 ( writer : writer , parentRequiredProperties : new HashSet < string > ( ) , propertyName : null ) ;
397
397
}
398
398
399
399
/// <summary>
@@ -403,7 +403,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
403
403
{
404
404
SerializeAsV2WithoutReference (
405
405
writer : writer ,
406
- parentRequiredProperties : new List < string > ( ) ,
406
+ parentRequiredProperties : new HashSet < string > ( ) ,
407
407
propertyName : null ) ;
408
408
}
409
409
@@ -416,7 +416,7 @@ public void SerializeAsV2WithoutReference(IOpenApiWriter writer)
416
416
/// <param name="propertyName">The property name that will be serialized.</param>
417
417
internal void SerializeAsV2 (
418
418
IOpenApiWriter writer ,
419
- IList < string > parentRequiredProperties ,
419
+ ISet < string > parentRequiredProperties ,
420
420
string propertyName )
421
421
{
422
422
if ( writer == null )
@@ -432,7 +432,7 @@ internal void SerializeAsV2(
432
432
433
433
if ( parentRequiredProperties == null )
434
434
{
435
- parentRequiredProperties = new List < string > ( ) ;
435
+ parentRequiredProperties = new HashSet < string > ( ) ;
436
436
}
437
437
438
438
SerializeAsV2WithoutReference ( writer , parentRequiredProperties , propertyName ) ;
@@ -447,7 +447,7 @@ internal void SerializeAsV2(
447
447
/// <param name="propertyName">The property name that will be serialized.</param>
448
448
internal void SerializeAsV2WithoutReference (
449
449
IOpenApiWriter writer ,
450
- IList < string > parentRequiredProperties ,
450
+ ISet < string > parentRequiredProperties ,
451
451
string propertyName )
452
452
{
453
453
writer . WriteStartObject ( ) ;
@@ -521,7 +521,7 @@ internal void WriteAsItemsProperties(IOpenApiWriter writer)
521
521
522
522
internal void WriteAsSchemaProperties (
523
523
IOpenApiWriter writer ,
524
- IList < string > parentRequiredProperties ,
524
+ ISet < string > parentRequiredProperties ,
525
525
string propertyName )
526
526
{
527
527
if ( writer == null )
0 commit comments