Mark some fields as deprecated in the API
This commit is contained in:
parent
cb40b280a4
commit
b38b8f6465
|
@ -66,6 +66,8 @@ class ServerTransformer extends BaseTransformer
|
||||||
'identifier' => $server->uuidShort,
|
'identifier' => $server->uuidShort,
|
||||||
'name' => $server->name,
|
'name' => $server->name,
|
||||||
'description' => $server->description,
|
'description' => $server->description,
|
||||||
|
'status' => $server->status,
|
||||||
|
// This field is deprecated, please use "status".
|
||||||
'suspended' => $server->isSuspended(),
|
'suspended' => $server->isSuspended(),
|
||||||
'limits' => [
|
'limits' => [
|
||||||
'memory' => $server->memory,
|
'memory' => $server->memory,
|
||||||
|
@ -88,6 +90,7 @@ class ServerTransformer extends BaseTransformer
|
||||||
'container' => [
|
'container' => [
|
||||||
'startup_command' => $server->startup,
|
'startup_command' => $server->startup,
|
||||||
'image' => $server->image,
|
'image' => $server->image,
|
||||||
|
// This field is deprecated, please use "status".
|
||||||
'installed' => $server->isInstalled() ? 1 : 0,
|
'installed' => $server->isInstalled() ? 1 : 0,
|
||||||
'environment' => $this->environmentService->handle($server),
|
'environment' => $this->environmentService->handle($server),
|
||||||
],
|
],
|
||||||
|
|
|
@ -70,7 +70,10 @@ class ServerTransformer extends BaseClientTransformer
|
||||||
'allocations' => $server->allocation_limit,
|
'allocations' => $server->allocation_limit,
|
||||||
'backups' => $server->backup_limit,
|
'backups' => $server->backup_limit,
|
||||||
],
|
],
|
||||||
|
'status' => $server->status,
|
||||||
|
// This field is deprecated, please use "status".
|
||||||
'is_suspended' => $server->isSuspended(),
|
'is_suspended' => $server->isSuspended(),
|
||||||
|
// This field is deprecated, please use "status".
|
||||||
'is_installing' => ! $server->isInstalled(),
|
'is_installing' => ! $server->isInstalled(),
|
||||||
'is_transferring' => ! is_null($server->transfer),
|
'is_transferring' => ! is_null($server->transfer),
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in New Issue