Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
add file path output
  • Loading branch information
Michael Frischbutter committed Nov 15, 2019
commit 05267ca742c21f777653b8ef193172f737a415f7
6 changes: 5 additions & 1 deletion bin/php-openapi
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,11 @@ switch ($command) {
}

if (!empty($errors)) {
print_formatted("\BErrors found while reading the API Description:\C\n", STDERR);
if ($inputFile === null) {
print_formatted("\BErrors found while reading the API description from STDIN:\C\n", STDERR);
} else {
print_formatted("\BErrors found while reading the API description from {$inputFile}:\C\n", STDERR);
}
foreach ($errors as $error) {
if (($openPos = strpos($error, '[')) !== false && ($closePos = strpos($error, ']')) !== false && $openPos < $closePos) {
$error = escape_formatted(substr($error, 0, $openPos + 1)) . '\Y'
Expand Down