'http://test.com', 'operations' => [ 'test' => [ 'httpMethod' => 'GET', 'uri' => '/api/{key}/foo', 'parameters' => [ 'key' => [ 'required' => true, 'type' => 'string', 'location' => 'uri' ], ] ] ] ]); $command = new Command('test', ['key' => 'bar']); $serializer = new Serializer($description); /** @var Request $request */ $request = $serializer($command); $this->assertEquals('http://test.com/api/bar/foo', $request->getUri()); } }