/** * {@inheritdoc} */ public function getResponsePayloadBodySchema($statusCode, $contentType) { $response = $this->method->getResponse($statusCode); if (empty($response) === false) { try { $body = $response->getBodyByType($contentType); return (string) $body->getSchema(); } catch (\Exception $e) { } } return; }
/** @test */ public function shouldGetEmptyArrayForQueryParametersIfNoneIsExists() { $apiDefinition = new \Raml\ApiDefinition('The title'); $method = \Raml\Method::createFromArray('get', [], $apiDefinition); $this->assertEquals([], $method->getQueryParameters()); }