Skip to content

Commit

Permalink
Merge pull request #1 from oxycoder/master
Browse files Browse the repository at this point in the history
merge
  • Loading branch information
bigexxx authored Jun 23, 2018
2 parents cff8b81 + eb197c1 commit 683cc4c
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/Oxycoder/ApiDoc/Generators/AbstractGenerator.php
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,9 @@ protected function getDocblockResponse($tags)
}
$responseTag = \array_first($responseTags);

return \response(\json_encode($responseTag->getContent()));
return \response(\json_encode($responseTag->getContent()), 200, [
'Content-Type' => 'application/json'
]);
}

/**
Expand Down Expand Up @@ -246,7 +248,7 @@ protected function getVadilationInFunction($route, $bindings)
$source = file($filename);
$body = implode('', array_slice($source, $start_line, $length));

preg_match('/(validate\(\[)(.*)(\]\))/s', $body, $result);
preg_match('/(validate\(\[)(.*?)(\]\))/s', $body, $result);
if ($result) {
$stringArr = explode(',', $result[2]);
foreach ($stringArr as $line) {
Expand Down

0 comments on commit 683cc4c

Please sign in to comment.