Example #1
0
File: RAML.php Project: RETFU/RREST
 /**
  * {@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;
 }
Example #2
0
 /** @test */
 public function shouldGetEmptyArrayForQueryParametersIfNoneIsExists()
 {
     $apiDefinition = new \Raml\ApiDefinition('The title');
     $method = \Raml\Method::createFromArray('get', [], $apiDefinition);
     $this->assertEquals([], $method->getQueryParameters());
 }