@@ -50,33 +50,6 @@ public async Task ParsePathItemWithQueryAndAdditionalOperationsV32Works()
5050 Assert . Equal ( "events" , subscribeOp . Parameters [ 0 ] . Name ) ;
5151 }
5252
53- [ Fact ]
54- public async Task ParsePathItemWithV32ExtensionsWorks ( )
55- {
56- // Arrange & Act
57- var result = await OpenApiDocument . LoadAsync ( $ "{ SampleFolderPath } pathItemWithV32Extensions.yaml", SettingsFixture . ReaderSettings ) ;
58- var pathItem = result . Document . Paths [ "/pets" ] ;
59-
60- // Assert
61- Assert . Equal ( "Pet operations" , pathItem . Summary ) ;
62- Assert . Equal ( "Operations available for pets" , pathItem . Description ) ;
63-
64- // Regular operations
65- Assert . True ( pathItem . Operations ? . ContainsKey ( HttpMethod . Get ) ) ;
66- var getOp = Assert . Contains ( HttpMethod . Get , pathItem . Operations ) ;
67- Assert . Equal ( "getPets" , getOp . OperationId ) ;
68-
69- // Query operation from extension should now be on the operation
70- var queryOp = Assert . Contains ( new HttpMethod ( "Query" ) , pathItem . Operations ) ;
71- Assert . Equal ( "Query pets with complex filters" , queryOp . Summary ) ;
72- Assert . Equal ( "queryPets" , queryOp . OperationId ) ;
73-
74- // Additional operations from extension should now be on the operation
75- var notifyOp = Assert . Contains ( new HttpMethod ( "notify" ) , pathItem . Operations ) ;
76- Assert . Equal ( "Notify about pet updates" , notifyOp . Summary ) ;
77- Assert . Equal ( "notifyPetUpdates" , notifyOp . OperationId ) ;
78- }
79-
8053 [ Fact ]
8154 public async Task SerializeV32PathItemToV31ProducesExtensions ( )
8255 {
@@ -120,8 +93,8 @@ public async Task SerializeV32PathItemToV31ProducesExtensions()
12093 var yaml = await pathItem . SerializeAsYamlAsync ( OpenApiSpecVersion . OpenApi3_1 ) ;
12194
12295 // Assert
123- Assert . Contains ( "x-oas-query :" , yaml ) ;
124- Assert . Contains ( "x-oas -additionalOperations:" , yaml ) ;
96+ Assert . Contains ( "Query :" , yaml ) ;
97+ Assert . Contains ( "x-oai -additionalOperations:" , yaml ) ;
12598 Assert . Contains ( "queryOp" , yaml ) ;
12699 Assert . Contains ( "notifyOp" , yaml ) ;
127100 }
@@ -169,8 +142,8 @@ public async Task SerializeV32PathItemToV3ProducesExtensions()
169142 var yaml = await pathItem . SerializeAsYamlAsync ( OpenApiSpecVersion . OpenApi3_0 ) ;
170143
171144 // Assert
172- Assert . Contains ( "x-oas-query :" , yaml ) ;
173- Assert . Contains ( "x-oas -additionalOperations:" , yaml ) ;
145+ Assert . Contains ( "Query :" , yaml ) ;
146+ Assert . Contains ( "x-oai -additionalOperations:" , yaml ) ;
174147 Assert . Contains ( "queryOp" , yaml ) ;
175148 Assert . Contains ( "notifyOp" , yaml ) ;
176149 }
0 commit comments