@@ -449,7 +449,7 @@ public async Task Resource_types_are_documented()
449
449
}
450
450
451
451
[ Fact ]
452
- public async Task Resource_attributes_are_documented ( )
452
+ public async Task Attributes_are_documented ( )
453
453
{
454
454
// Act
455
455
JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
@@ -471,6 +471,43 @@ public async Task Resource_attributes_are_documented()
471
471
} ) ;
472
472
}
473
473
474
+ [ Fact ]
475
+ public async Task Relationships_are_documented ( )
476
+ {
477
+ // Act
478
+ JsonElement document = await _testContext . GetSwaggerDocumentAsync ( ) ;
479
+
480
+ // Assert
481
+ document . Should ( ) . ContainPath ( "components.schemas" ) . With ( schemasElement =>
482
+ {
483
+ schemasElement . Should ( ) . HaveProperty ( "elevatorRelationshipsInPatchRequest.properties.existsIn.description" , "The skyscraper this elevator exists in." ) ;
484
+ schemasElement . Should ( ) . HaveProperty ( "elevatorRelationshipsInPostRequest.properties.existsIn.description" , "The skyscraper this elevator exists in." ) ;
485
+ schemasElement . Should ( ) . HaveProperty ( "elevatorRelationshipsInResponse.properties.existsIn.description" , "The skyscraper this elevator exists in." ) ;
486
+
487
+ schemasElement . Should ( ) . ContainPath ( "skyscraperRelationshipsInPatchRequest.properties" ) . With ( propertiesElement =>
488
+ {
489
+ propertiesElement . Should ( ) . HaveProperty ( "elevator.description" , "An optional elevator within this building, providing access to spaces." ) ;
490
+ propertiesElement . Should ( ) . HaveProperty ( "spaces.description" , "The spaces within this building." ) ;
491
+ } ) ;
492
+
493
+ schemasElement . Should ( ) . ContainPath ( "skyscraperRelationshipsInPostRequest.properties" ) . With ( propertiesElement =>
494
+ {
495
+ propertiesElement . Should ( ) . HaveProperty ( "elevator.description" , "An optional elevator within this building, providing access to spaces." ) ;
496
+ propertiesElement . Should ( ) . HaveProperty ( "spaces.description" , "The spaces within this building." ) ;
497
+ } ) ;
498
+
499
+ schemasElement . Should ( ) . ContainPath ( "skyscraperRelationshipsInResponse.properties" ) . With ( propertiesElement =>
500
+ {
501
+ propertiesElement . Should ( ) . HaveProperty ( "elevator.description" , "An optional elevator within this building, providing access to spaces." ) ;
502
+ propertiesElement . Should ( ) . HaveProperty ( "spaces.description" , "The spaces within this building." ) ;
503
+ } ) ;
504
+
505
+ schemasElement . Should ( ) . HaveProperty ( "spaceRelationshipsInPatchRequest.properties.existsIn.description" , "The skyscraper this space exists in." ) ;
506
+ schemasElement . Should ( ) . HaveProperty ( "spaceRelationshipsInPostRequest.properties.existsIn.description" , "The skyscraper this space exists in." ) ;
507
+ schemasElement . Should ( ) . HaveProperty ( "spaceRelationshipsInResponse.properties.existsIn.description" , "The skyscraper this space exists in." ) ;
508
+ } ) ;
509
+ }
510
+
474
511
[ Fact ]
475
512
public async Task Enums_are_documented ( )
476
513
{
0 commit comments