@@ -113,7 +113,7 @@ public void ParseInlineStringWithoutProvidingFormatSucceeds()
113
113
[ Fact ]
114
114
public async Task ParseBasicDocumentWithMultipleServersShouldSucceed ( )
115
115
{
116
- var path = System . IO . Path . Combine ( SampleFolderPath , "basicDocumentWithMultipleServers.yaml" ) ;
116
+ var path = Path . Combine ( SampleFolderPath , "basicDocumentWithMultipleServers.yaml" ) ;
117
117
var result = await OpenApiDocument . LoadAsync ( path ) ;
118
118
119
119
Assert . Empty ( result . Diagnostic . Errors ) ;
@@ -144,13 +144,13 @@ public async Task ParseBasicDocumentWithMultipleServersShouldSucceed()
144
144
[ Fact ]
145
145
public async Task ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic ( )
146
146
{
147
- using var stream = Resources . GetStream ( System . IO . Path . Combine ( SampleFolderPath , "brokenMinimalDocument.yaml" ) ) ;
147
+ using var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "brokenMinimalDocument.yaml" ) ) ;
148
148
// Copy stream to MemoryStream
149
149
using var memoryStream = new MemoryStream ( ) ;
150
150
await stream . CopyToAsync ( memoryStream ) ;
151
151
memoryStream . Position = 0 ;
152
152
153
- var result = OpenApiDocument . Load ( memoryStream ) ;
153
+ var result = await OpenApiDocument . LoadAsync ( memoryStream ) ;
154
154
155
155
result . Document . Should ( ) . BeEquivalentTo (
156
156
new OpenApiDocument
@@ -176,7 +176,7 @@ public async Task ParseBrokenMinimalDocumentShouldYieldExpectedDiagnostic()
176
176
[ Fact ]
177
177
public async Task ParseMinimalDocumentShouldSucceed ( )
178
178
{
179
- var result = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "minimalDocument.yaml" ) ) ;
179
+ var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "minimalDocument.yaml" ) ) ;
180
180
181
181
result . Document . Should ( ) . BeEquivalentTo (
182
182
new OpenApiDocument
@@ -199,7 +199,7 @@ public async Task ParseMinimalDocumentShouldSucceed()
199
199
[ Fact ]
200
200
public async Task ParseStandardPetStoreDocumentShouldSucceed ( )
201
201
{
202
- using var stream = Resources . GetStream ( System . IO . Path . Combine ( SampleFolderPath , "petStore.yaml" ) ) ;
202
+ using var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "petStore.yaml" ) ) ;
203
203
var actual = await OpenApiDocument . LoadAsync ( stream , OpenApiConstants . Yaml ) ;
204
204
205
205
var components = new OpenApiComponents
@@ -585,7 +585,7 @@ public async Task ParseStandardPetStoreDocumentShouldSucceed()
585
585
[ Fact ]
586
586
public async Task ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed ( )
587
587
{
588
- using var stream = Resources . GetStream ( System . IO . Path . Combine ( SampleFolderPath , "petStoreWithTagAndSecurity.yaml" ) ) ;
588
+ using var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "petStoreWithTagAndSecurity.yaml" ) ) ;
589
589
var actual = await OpenApiDocument . LoadAsync ( stream , OpenApiConstants . Yaml ) ;
590
590
591
591
var components = new OpenApiComponents
@@ -1089,7 +1089,7 @@ public async Task ParseModifiedPetStoreDocumentWithTagAndSecurityShouldSucceed()
1089
1089
[ Fact ]
1090
1090
public async Task ParsePetStoreExpandedShouldSucceed ( )
1091
1091
{
1092
- var actual = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "petStoreExpanded.yaml" ) ) ;
1092
+ var actual = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "petStoreExpanded.yaml" ) ) ;
1093
1093
1094
1094
// TODO: Create the object in memory and compare with the one read from YAML file.
1095
1095
@@ -1100,7 +1100,7 @@ public async Task ParsePetStoreExpandedShouldSucceed()
1100
1100
[ Fact ]
1101
1101
public async Task GlobalSecurityRequirementShouldReferenceSecurityScheme ( )
1102
1102
{
1103
- var result = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "securedApi.yaml" ) ) ;
1103
+ var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "securedApi.yaml" ) ) ;
1104
1104
1105
1105
var securityRequirement = result . Document . SecurityRequirements [ 0 ] ;
1106
1106
@@ -1111,7 +1111,7 @@ public async Task GlobalSecurityRequirementShouldReferenceSecurityScheme()
1111
1111
[ Fact ]
1112
1112
public async Task HeaderParameterShouldAllowExample ( )
1113
1113
{
1114
- var result = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "apiWithFullHeaderComponent.yaml" ) ) ;
1114
+ var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "apiWithFullHeaderComponent.yaml" ) ) ;
1115
1115
1116
1116
var exampleHeader = result . Document . Components ? . Headers ? [ "example-header" ] ;
1117
1117
Assert . NotNull ( exampleHeader ) ;
@@ -1179,7 +1179,7 @@ public async Task ParseDocumentWithReferencedSecuritySchemeWorks()
1179
1179
ReferenceResolution = ReferenceResolutionSetting . ResolveLocalReferences
1180
1180
} ;
1181
1181
1182
- var result = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "docWithSecuritySchemeReference.yaml" ) , settings ) ;
1182
+ var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "docWithSecuritySchemeReference.yaml" ) , settings ) ;
1183
1183
var securityScheme = result . Document . Components . SecuritySchemes [ "OAuth2" ] ;
1184
1184
1185
1185
// Assert
@@ -1191,7 +1191,7 @@ public async Task ParseDocumentWithReferencedSecuritySchemeWorks()
1191
1191
public async Task ParseDocumentWithJsonSchemaReferencesWorks ( )
1192
1192
{
1193
1193
// Arrange
1194
- using var stream = Resources . GetStream ( System . IO . Path . Combine ( SampleFolderPath , "docWithJsonSchema.yaml" ) ) ;
1194
+ using var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "docWithJsonSchema.yaml" ) ) ;
1195
1195
1196
1196
// Act
1197
1197
var settings = new OpenApiReaderSettings
@@ -1311,7 +1311,7 @@ public async Task ParseDocWithRefsUsingProxyReferencesSucceeds()
1311
1311
format: int32
1312
1312
default: 10" ;
1313
1313
1314
- using var stream = Resources . GetStream ( System . IO . Path . Combine ( SampleFolderPath , "minifiedPetStore.yaml" ) ) ;
1314
+ using var stream = Resources . GetStream ( Path . Combine ( SampleFolderPath , "minifiedPetStore.yaml" ) ) ;
1315
1315
1316
1316
// Act
1317
1317
var doc = ( await OpenApiDocument . LoadAsync ( stream ) ) . Document ;
@@ -1400,7 +1400,7 @@ public void ParseBasicDocumentWithServerVariableAndNoDefaultShouldFail()
1400
1400
[ Fact ]
1401
1401
public async Task ParseDocumentWithEmptyPathsSucceeds ( )
1402
1402
{
1403
- var result = await OpenApiDocument . LoadAsync ( System . IO . Path . Combine ( SampleFolderPath , "docWithEmptyPaths.yaml" ) ) ;
1403
+ var result = await OpenApiDocument . LoadAsync ( Path . Combine ( SampleFolderPath , "docWithEmptyPaths.yaml" ) ) ;
1404
1404
Assert . Empty ( result . Diagnostic . Errors ) ;
1405
1405
}
1406
1406
}
0 commit comments