Skip to content

Commit

Permalink
fix: Add final newlines to generated specs
Browse files Browse the repository at this point in the history
Signed-off-by: provokateurin <[email protected]>
  • Loading branch information
provokateurin committed Jun 4, 2024
1 parent 43502e9 commit 7d9977c
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion generate-spec
Original file line number Diff line number Diff line change
Expand Up @@ -983,7 +983,7 @@ foreach ($scopePaths as $scope => $paths) {
$scopeOut = $out . $scopeSuffix;
}

file_put_contents($scopeOut, json_encode($openapiScope, Helpers::jsonFlags()));
file_put_contents($scopeOut, json_encode($openapiScope, Helpers::jsonFlags()) . "\n");

Logger::info('app', 'Generated scope ' . $scope . ' with ' . $pathsCount . ' routes!');
}
2 changes: 1 addition & 1 deletion merge-specs
Original file line number Diff line number Diff line change
Expand Up @@ -170,4 +170,4 @@ function rewriteOperations(array $spec): array {
return $spec["paths"];
}

file_put_contents($mergedSpecPath, json_encode($data, Helpers::jsonFlags()));
file_put_contents($mergedSpecPath, json_encode($data, Helpers::jsonFlags()) . "\n");
2 changes: 1 addition & 1 deletion tests/openapi-administration.json
Original file line number Diff line number Diff line change
Expand Up @@ -3322,4 +3322,4 @@
}
},
"tags": []
}
}
2 changes: 1 addition & 1 deletion tests/openapi-federation.json
Original file line number Diff line number Diff line change
Expand Up @@ -120,4 +120,4 @@
}
},
"tags": []
}
}
2 changes: 1 addition & 1 deletion tests/openapi-full.json
Original file line number Diff line number Diff line change
Expand Up @@ -3992,4 +3992,4 @@
}
},
"tags": []
}
}
2 changes: 1 addition & 1 deletion tests/openapi.json
Original file line number Diff line number Diff line change
Expand Up @@ -719,4 +719,4 @@
}
},
"tags": []
}
}

0 comments on commit 7d9977c

Please sign in to comment.