Mark some fields as deprecated in the API

This commit is contained in:
Dane Everitt 2021-01-17 16:02:11 -08:00
parent cb40b280a4
commit b38b8f6465
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53
2 changed files with 6 additions and 0 deletions

View file

@ -66,6 +66,8 @@ class ServerTransformer extends BaseTransformer
'identifier' => $server->uuidShort,
'name' => $server->name,
'description' => $server->description,
'status' => $server->status,
// This field is deprecated, please use "status".
'suspended' => $server->isSuspended(),
'limits' => [
'memory' => $server->memory,
@ -88,6 +90,7 @@ class ServerTransformer extends BaseTransformer
'container' => [
'startup_command' => $server->startup,
'image' => $server->image,
// This field is deprecated, please use "status".
'installed' => $server->isInstalled() ? 1 : 0,
'environment' => $this->environmentService->handle($server),
],

View file

@ -70,7 +70,10 @@ class ServerTransformer extends BaseClientTransformer
'allocations' => $server->allocation_limit,
'backups' => $server->backup_limit,
],
'status' => $server->status,
// This field is deprecated, please use "status".
'is_suspended' => $server->isSuspended(),
// This field is deprecated, please use "status".
'is_installing' => ! $server->isInstalled(),
'is_transferring' => ! is_null($server->transfer),
];