@@ -25,7 +25,7 @@ namespace Microsoft.OpenApi.Tests.Models
25
25
[ UsesVerify ]
26
26
public class OpenApiDocumentTests
27
27
{
28
- public static OpenApiComponents TopLevelReferencingComponents = new OpenApiComponents ( )
28
+ public static readonly OpenApiComponents TopLevelReferencingComponents = new OpenApiComponents ( )
29
29
{
30
30
Schemas =
31
31
{
@@ -37,7 +37,7 @@ public class OpenApiDocumentTests
37
37
}
38
38
} ;
39
39
40
- public static OpenApiComponents TopLevelSelfReferencingComponentsWithOtherProperties = new OpenApiComponents ( )
40
+ public static readonly OpenApiComponents TopLevelSelfReferencingComponentsWithOtherProperties = new OpenApiComponents ( )
41
41
{
42
42
Schemas =
43
43
{
@@ -52,15 +52,15 @@ public class OpenApiDocumentTests
52
52
53
53
} ;
54
54
55
- public static OpenApiComponents TopLevelSelfReferencingComponents = new OpenApiComponents ( )
55
+ public static readonly OpenApiComponents TopLevelSelfReferencingComponents = new OpenApiComponents ( )
56
56
{
57
57
Schemas =
58
58
{
59
59
[ "schema1" ] = new JsonSchemaBuilder ( ) . Ref ( "#/definitions/schemas/schema1" )
60
60
}
61
61
} ;
62
62
63
- public static OpenApiDocument SimpleDocumentWithTopLevelReferencingComponents = new OpenApiDocument ( )
63
+ public static readonly OpenApiDocument SimpleDocumentWithTopLevelReferencingComponents = new OpenApiDocument ( )
64
64
{
65
65
Info = new OpenApiInfo ( )
66
66
{
@@ -69,7 +69,7 @@ public class OpenApiDocumentTests
69
69
Components = TopLevelReferencingComponents
70
70
} ;
71
71
72
- public static OpenApiDocument SimpleDocumentWithTopLevelSelfReferencingComponentsWithOtherProperties = new OpenApiDocument ( )
72
+ public static readonly OpenApiDocument SimpleDocumentWithTopLevelSelfReferencingComponentsWithOtherProperties = new OpenApiDocument ( )
73
73
{
74
74
Info = new OpenApiInfo ( )
75
75
{
@@ -78,7 +78,7 @@ public class OpenApiDocumentTests
78
78
Components = TopLevelSelfReferencingComponentsWithOtherProperties
79
79
} ;
80
80
81
- public static OpenApiDocument SimpleDocumentWithTopLevelSelfReferencingComponents = new OpenApiDocument ( )
81
+ public static readonly OpenApiDocument SimpleDocumentWithTopLevelSelfReferencingComponents = new OpenApiDocument ( )
82
82
{
83
83
Info = new OpenApiInfo ( )
84
84
{
@@ -87,7 +87,7 @@ public class OpenApiDocumentTests
87
87
Components = TopLevelSelfReferencingComponents
88
88
} ;
89
89
90
- public static OpenApiComponents AdvancedComponentsWithReference = new OpenApiComponents
90
+ public static readonly OpenApiComponents AdvancedComponentsWithReference = new OpenApiComponents
91
91
{
92
92
Schemas = new Dictionary < string , JsonSchema >
93
93
{
@@ -116,14 +116,14 @@ public class OpenApiDocumentTests
116
116
}
117
117
} ;
118
118
119
- public static JsonSchema PetSchemaWithReference = AdvancedComponentsWithReference . Schemas [ "pet" ] ;
119
+ public static readonly JsonSchema PetSchemaWithReference = AdvancedComponentsWithReference . Schemas [ "pet" ] ;
120
120
121
- public static JsonSchema NewPetSchemaWithReference = AdvancedComponentsWithReference . Schemas [ "newPet" ] ;
121
+ public static readonly JsonSchema NewPetSchemaWithReference = AdvancedComponentsWithReference . Schemas [ "newPet" ] ;
122
122
123
- public static JsonSchema ErrorModelSchemaWithReference =
123
+ public static readonly JsonSchema ErrorModelSchemaWithReference =
124
124
AdvancedComponentsWithReference . Schemas [ "errorModel" ] ;
125
125
126
- public static OpenApiDocument AdvancedDocumentWithReference = new OpenApiDocument
126
+ public static readonly OpenApiDocument AdvancedDocumentWithReference = new OpenApiDocument
127
127
{
128
128
Info = new OpenApiInfo
129
129
{
@@ -402,7 +402,7 @@ public class OpenApiDocumentTests
402
402
Components = AdvancedComponentsWithReference
403
403
} ;
404
404
405
- public static OpenApiComponents AdvancedComponents = new OpenApiComponents
405
+ public static readonly OpenApiComponents AdvancedComponents = new OpenApiComponents
406
406
{
407
407
Schemas = new Dictionary < string , JsonSchema >
408
408
{
@@ -428,11 +428,11 @@ public class OpenApiDocumentTests
428
428
}
429
429
} ;
430
430
431
- public static JsonSchema PetSchema = AdvancedComponents . Schemas [ "pet" ] ;
431
+ public static readonly JsonSchema PetSchema = AdvancedComponents . Schemas [ "pet" ] ;
432
432
433
- public static JsonSchema NewPetSchema = AdvancedComponents . Schemas [ "newPet" ] ;
433
+ public static readonly JsonSchema NewPetSchema = AdvancedComponents . Schemas [ "newPet" ] ;
434
434
435
- public static JsonSchema ErrorModelSchema = AdvancedComponents . Schemas [ "errorModel" ] ;
435
+ public static readonly JsonSchema ErrorModelSchema = AdvancedComponents . Schemas [ "errorModel" ] ;
436
436
437
437
public OpenApiDocument AdvancedDocument = new OpenApiDocument
438
438
{
@@ -719,7 +719,7 @@ public class OpenApiDocumentTests
719
719
Components = AdvancedComponents
720
720
} ;
721
721
722
- public static OpenApiDocument DocumentWithWebhooks = new OpenApiDocument ( )
722
+ public static readonly OpenApiDocument DocumentWithWebhooks = new OpenApiDocument ( )
723
723
{
724
724
Info = new OpenApiInfo
725
725
{
@@ -773,7 +773,7 @@ public class OpenApiDocumentTests
773
773
}
774
774
} ;
775
775
776
- public static OpenApiDocument DuplicateExtensions = new OpenApiDocument
776
+ public static readonly OpenApiDocument DuplicateExtensions = new OpenApiDocument
777
777
{
778
778
Info = new OpenApiInfo
779
779
{
0 commit comments