Merge pull request #8643 from appwrite/chore-prettyprint-specs

Chores: Prettyprint specs
This commit is contained in:
Christy Jacob 2024-09-10 14:52:43 +04:00 committed by GitHub
commit a00c771be0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 303572 additions and 14 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View file

@ -280,7 +280,7 @@ class Specs extends Action
if ($mocks) {
$path = __DIR__ . '/../../../../app/config/specs/' . $format . '-mocks-' . $platform . '.json';
if (!file_put_contents($path, json_encode($specs->parse()))) {
if (!file_put_contents($path, json_encode($specs->parse(), JSON_PRETTY_PRINT))) {
throw new Exception('Failed to save mocks spec file: ' . $path);
}
@ -291,7 +291,7 @@ class Specs extends Action
$path = __DIR__ . '/../../../../app/config/specs/' . $format . '-' . $version . '-' . $platform . '.json';
if (!file_put_contents($path, json_encode($specs->parse()))) {
if (!file_put_contents($path, json_encode($specs->parse(), JSON_PRETTY_PRINT))) {
throw new Exception('Failed to save spec file: ' . $path);
}