@@ -322,6 +322,7 @@ static void AssertPathParameter(OpenApiOperation operation)
322
322
{
323
323
var param = Assert . Single ( operation . Parameters ) ;
324
324
Assert . Equal ( ParameterLocation . Path , param . In ) ;
325
+ Assert . Empty ( param . Content ) ;
325
326
}
326
327
327
328
AssertPathParameter ( GetOpenApiOperation ( ( int foo ) => { } , "/{foo}" ) ) ;
@@ -335,6 +336,7 @@ static void AssertPathParameter(OpenApiOperation operation)
335
336
{
336
337
var param = Assert . Single ( operation . Parameters ) ;
337
338
Assert . Equal ( ParameterLocation . Path , param . In ) ;
339
+ Assert . Empty ( param . Content ) ;
338
340
}
339
341
AssertPathParameter ( GetOpenApiOperation ( ( TryParseStringRecord foo ) => { } , pattern : "/{foo}" ) ) ;
340
342
}
@@ -346,6 +348,7 @@ static void AssertPathParameter(OpenApiOperation operation)
346
348
{
347
349
var param = Assert . Single ( operation . Parameters ) ;
348
350
Assert . Equal ( ParameterLocation . Path , param . In ) ;
351
+ Assert . Empty ( param . Content ) ;
349
352
}
350
353
351
354
AssertPathParameter ( GetOpenApiOperation ( ( int ? foo ) => { } , "/{foo}" ) ) ;
@@ -359,6 +362,7 @@ static void AssertPathParameter(OpenApiOperation operation)
359
362
{
360
363
var param = Assert . Single ( operation . Parameters ) ;
361
364
Assert . Equal ( ParameterLocation . Path , param . In ) ;
365
+ Assert . Empty ( param . Content ) ;
362
366
}
363
367
AssertPathParameter ( GetOpenApiOperation ( ( TryParseStringRecordStruct foo ) => { } , pattern : "/{foo}" ) ) ;
364
368
}
@@ -370,6 +374,7 @@ static void AssertQueryParameter(OpenApiOperation operation, string type)
370
374
{
371
375
var param = Assert . Single ( operation . Parameters ) ;
372
376
Assert . Equal ( ParameterLocation . Query , param . In ) ;
377
+ Assert . Empty ( param . Content ) ;
373
378
}
374
379
375
380
AssertQueryParameter ( GetOpenApiOperation ( ( int foo ) => { } , "/" ) , "integer" ) ;
@@ -388,6 +393,7 @@ public void AddsFromHeaderParameterAsHeader()
388
393
var param = Assert . Single ( operation . Parameters ) ;
389
394
390
395
Assert . Equal ( ParameterLocation . Header , param . In ) ;
396
+ Assert . Empty ( param . Content ) ;
391
397
}
392
398
393
399
[ Fact ]
@@ -430,11 +436,13 @@ public void AddsMultipleParameters()
430
436
Assert . Equal ( "foo" , fooParam . Name ) ;
431
437
Assert . Equal ( ParameterLocation . Path , fooParam . In ) ;
432
438
Assert . True ( fooParam . Required ) ;
439
+ Assert . Empty ( fooParam . Content ) ;
433
440
434
441
var barParam = operation . Parameters [ 1 ] ;
435
442
Assert . Equal ( "bar" , barParam . Name ) ;
436
443
Assert . Equal ( ParameterLocation . Query , barParam . In ) ;
437
444
Assert . True ( barParam . Required ) ;
445
+ Assert . Empty ( barParam . Content ) ;
438
446
439
447
var fromBodyParam = operation . RequestBody ;
440
448
var fromBodyContent = Assert . Single ( fromBodyParam . Content ) ;
@@ -455,12 +463,14 @@ static void AssertParameters(OpenApiOperation operation, string capturedName = "
455
463
Assert . Equal ( capturedName , param . Name ) ;
456
464
Assert . Equal ( ParameterLocation . Path , param . In ) ;
457
465
Assert . True ( param . Required ) ;
466
+ Assert . Empty ( param . Content ) ;
458
467
} ,
459
468
param =>
460
469
{
461
470
Assert . Equal ( "Bar" , param . Name ) ;
462
471
Assert . Equal ( ParameterLocation . Query , param . In ) ;
463
472
Assert . True ( param . Required ) ;
473
+ Assert . Empty ( param . Content ) ;
464
474
}
465
475
) ;
466
476
}
@@ -485,11 +495,13 @@ public void TestParameterIsRequired()
485
495
Assert . Equal ( "foo" , fooParam . Name ) ;
486
496
Assert . Equal ( ParameterLocation . Path , fooParam . In ) ;
487
497
Assert . True ( fooParam . Required ) ;
498
+ Assert . Empty ( fooParam . Content ) ;
488
499
489
500
var barParam = operation . Parameters [ 1 ] ;
490
501
Assert . Equal ( "bar" , barParam . Name ) ;
491
502
Assert . Equal ( ParameterLocation . Query , barParam . In ) ;
492
503
Assert . False ( barParam . Required ) ;
504
+ Assert . Empty ( barParam . Content ) ;
493
505
}
494
506
495
507
[ Fact ]
0 commit comments