@@ -186,7 +186,7 @@ public function it_supports_definition_of_objects_shorthand_type_ns(): void
186186 /** @var ReferenceType $billingAddress */
187187 $ billingAddress = $ properties ['billing_address ' ]->first ();
188188 $ this ->assertInstanceOf (ReferenceType::class, $ billingAddress );
189- $ this ->assertSame (['namespace ' => 'Order ' ], $ billingAddress ->custom ());
189+ $ this ->assertSame (['namespace ' => '/ Order ' ], $ billingAddress ->custom ());
190190
191191 /** @var ArrayType $shippingAddress */
192192 $ shippingAddress = $ properties ['shipping_address ' ]->first ();
@@ -196,7 +196,8 @@ public function it_supports_definition_of_objects_shorthand_type_ns(): void
196196 /** @var ReferenceType $address */
197197 $ address = $ shippingAddress ->items ()[0 ]->first ();
198198 $ this ->assertInstanceOf (ReferenceType::class, $ address );
199- $ this ->assertSame (['namespace ' => 'Order ' ], $ address ->custom ());
199+ $ this ->assertSame (['namespace ' => '/Order ' ], $ address ->custom ());
200+ $ this ->assertSame ('#/definitions/Order/Address ' , $ address ->ref ());
200201 }
201202
202203 /**
@@ -383,12 +384,12 @@ public function it_supports_definition_of_objects_shorthand_nested_ns(): void
383384 $ paymentAddress = $ subProperties ['payment_address ' ]->first ();
384385 $ this ->assertInstanceOf (StringType::class, $ paymentAddress );
385386 // value object defines it's own namespace
386- $ this ->assertSame (['namespace ' => 'Payment ' ], $ paymentAddress ->custom ());
387+ $ this ->assertSame (['namespace ' => '/ Payment ' ], $ paymentAddress ->custom ());
387388
388389 /** @var ReferenceType $billingAddress */
389390 $ billingAddress = $ subProperties ['billing_address ' ]->first ();
390391 $ this ->assertInstanceOf (ReferenceType::class, $ billingAddress );
391- // reference value object use defined voNamespace because of missing namespace definition
392+ // reference value object uses defined voNamespace because of missing namespace definition
392393 $ this ->assertSame (['namespace ' => '/Shipping ' ], $ billingAddress ->custom ());
393394 $ this ->assertSame ('#/definitions/Shipping/Address ' , $ billingAddress ->ref ());
394395
0 commit comments