@@ -604,13 +604,31 @@ public void Generate_HandlesAnyOfSchemasInProperties()
604604
605605 // Verify anyOf properties are correctly typed - THIS PROVES BUG #142 IS FIXED
606606 Assert . IsTrue ( result . ModelsCode . Contains ( "public record KnowledgeBoxObj(" ) ) ;
607- Assert . IsTrue ( result . ModelsCode . Contains ( "string? Slug" ) , $ "Expected 'string? Slug' but got: { result . ModelsCode } ") ;
608- Assert . IsTrue ( result . ModelsCode . Contains ( "string Uuid" ) , $ "Expected 'string Uuid' but got: { result . ModelsCode } ") ;
609- Assert . IsTrue ( result . ModelsCode . Contains ( "KnowledgeBoxConfig? Config" ) , $ "Expected 'KnowledgeBoxConfig? Config' but got: { result . ModelsCode } ") ;
610- Assert . IsTrue ( result . ModelsCode . Contains ( "SemanticModelMetadata? Model" ) , $ "Expected 'SemanticModelMetadata? Model' but got: { result . ModelsCode } ") ;
607+ Assert . IsTrue (
608+ result . ModelsCode . Contains ( "string? Slug" ) ,
609+ $ "Expected 'string? Slug' but got: { result . ModelsCode } "
610+ ) ;
611+ Assert . IsTrue (
612+ result . ModelsCode . Contains ( "string Uuid" ) ,
613+ $ "Expected 'string Uuid' but got: { result . ModelsCode } "
614+ ) ;
615+ Assert . IsTrue (
616+ result . ModelsCode . Contains ( "KnowledgeBoxConfig? Config" ) ,
617+ $ "Expected 'KnowledgeBoxConfig? Config' but got: { result . ModelsCode } "
618+ ) ;
619+ Assert . IsTrue (
620+ result . ModelsCode . Contains ( "SemanticModelMetadata? Model" ) ,
621+ $ "Expected 'SemanticModelMetadata? Model' but got: { result . ModelsCode } "
622+ ) ;
611623 Assert . IsFalse ( result . ModelsCode . Contains ( "object Slug" ) , "Should not have 'object Slug'" ) ;
612- Assert . IsFalse ( result . ModelsCode . Contains ( "object Config" ) , "Should not have 'object Config'" ) ;
613- Assert . IsFalse ( result . ModelsCode . Contains ( "object Model" ) , "Should not have 'object Model'" ) ;
624+ Assert . IsFalse (
625+ result . ModelsCode . Contains ( "object Config" ) ,
626+ "Should not have 'object Config'"
627+ ) ;
628+ Assert . IsFalse (
629+ result . ModelsCode . Contains ( "object Model" ) ,
630+ "Should not have 'object Model'"
631+ ) ;
614632 }
615633
616634 [ TestMethod ]
@@ -1707,8 +1725,14 @@ public void Generate_HandlesRequiredHeaderParameters()
17071725 OpenApiCodeGenerator . Generate ( spec , "TestApi" , "TestApiExtensions" , Path . GetTempPath ( ) )
17081726 ) ;
17091727
1710- Assert . IsTrue ( result . ExtensionMethodsCode . Contains ( "authorization" ) , "Should contain 'authorization'" ) ;
1711- Assert . IsTrue ( result . ExtensionMethodsCode . Contains ( "xRequestID" ) , "Should contain 'xRequestID'" ) ;
1728+ Assert . IsTrue (
1729+ result . ExtensionMethodsCode . Contains ( "authorization" ) ,
1730+ "Should contain 'authorization'"
1731+ ) ;
1732+ Assert . IsTrue (
1733+ result . ExtensionMethodsCode . Contains ( "xRequestID" ) ,
1734+ "Should contain 'xRequestID'"
1735+ ) ;
17121736 }
17131737
17141738 [ TestMethod ]
0 commit comments