Skip to content
This repository was archived by the owner on Oct 26, 2019. It is now read-only.

Commit 6343bbb

Browse files
committed
Fix async version, use non strict mode
1 parent 36c8155 commit 6343bbb

File tree

168 files changed

+1229
-1383
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

168 files changed

+1229
-1383
lines changed

.jane-openapi

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,4 +5,5 @@ return [
55
'namespace' => 'Docker\\API',
66
'openapi-file' => __DIR__ . '/docker-swagger.yaml',
77
'async' => true,
8+
'strict' => false,
89
];

src/Normalizer/AuthConfigNormalizer.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,19 +35,19 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\AuthConfig();
42-
if (property_exists($data, 'username')) {
41+
if (property_exists($data, 'username') && $data->{'username'} !== null) {
4342
$object->setUsername($data->{'username'});
4443
}
45-
if (property_exists($data, 'password')) {
44+
if (property_exists($data, 'password') && $data->{'password'} !== null) {
4645
$object->setPassword($data->{'password'});
4746
}
48-
if (property_exists($data, 'email')) {
47+
if (property_exists($data, 'email') && $data->{'email'} !== null) {
4948
$object->setEmail($data->{'email'});
5049
}
51-
if (property_exists($data, 'serveraddress')) {
50+
if (property_exists($data, 'serveraddress') && $data->{'serveraddress'} !== null) {
5251
$object->setServeraddress($data->{'serveraddress'});
5352
}
5453

src/Normalizer/AuthPostResponse200Normalizer.php

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,13 +35,13 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\AuthPostResponse200();
42-
if (property_exists($data, 'Status')) {
41+
if (property_exists($data, 'Status') && $data->{'Status'} !== null) {
4342
$object->setStatus($data->{'Status'});
4443
}
45-
if (property_exists($data, 'IdentityToken')) {
44+
if (property_exists($data, 'IdentityToken') && $data->{'IdentityToken'} !== null) {
4645
$object->setIdentityToken($data->{'IdentityToken'});
4746
}
4847

src/Normalizer/BuildInfoNormalizer.php

Lines changed: 8 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,28 +35,28 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\BuildInfo();
42-
if (property_exists($data, 'id')) {
41+
if (property_exists($data, 'id') && $data->{'id'} !== null) {
4342
$object->setId($data->{'id'});
4443
}
45-
if (property_exists($data, 'stream')) {
44+
if (property_exists($data, 'stream') && $data->{'stream'} !== null) {
4645
$object->setStream($data->{'stream'});
4746
}
48-
if (property_exists($data, 'error')) {
47+
if (property_exists($data, 'error') && $data->{'error'} !== null) {
4948
$object->setError($data->{'error'});
5049
}
51-
if (property_exists($data, 'errorDetail')) {
50+
if (property_exists($data, 'errorDetail') && $data->{'errorDetail'} !== null) {
5251
$object->setErrorDetail($this->denormalizer->denormalize($data->{'errorDetail'}, 'Docker\\API\\Model\\ErrorDetail', 'json', $context));
5352
}
54-
if (property_exists($data, 'status')) {
53+
if (property_exists($data, 'status') && $data->{'status'} !== null) {
5554
$object->setStatus($data->{'status'});
5655
}
57-
if (property_exists($data, 'progress')) {
56+
if (property_exists($data, 'progress') && $data->{'progress'} !== null) {
5857
$object->setProgress($data->{'progress'});
5958
}
60-
if (property_exists($data, 'progressDetail')) {
59+
if (property_exists($data, 'progressDetail') && $data->{'progressDetail'} !== null) {
6160
$object->setProgressDetail($this->denormalizer->denormalize($data->{'progressDetail'}, 'Docker\\API\\Model\\ProgressDetail', 'json', $context));
6261
}
6362

src/Normalizer/ClusterInfoNormalizer.php

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,22 +35,22 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\ClusterInfo();
42-
if (property_exists($data, 'ID')) {
41+
if (property_exists($data, 'ID') && $data->{'ID'} !== null) {
4342
$object->setID($data->{'ID'});
4443
}
45-
if (property_exists($data, 'Version')) {
44+
if (property_exists($data, 'Version') && $data->{'Version'} !== null) {
4645
$object->setVersion($this->denormalizer->denormalize($data->{'Version'}, 'Docker\\API\\Model\\ClusterInfoVersion', 'json', $context));
4746
}
48-
if (property_exists($data, 'CreatedAt')) {
47+
if (property_exists($data, 'CreatedAt') && $data->{'CreatedAt'} !== null) {
4948
$object->setCreatedAt($data->{'CreatedAt'});
5049
}
51-
if (property_exists($data, 'UpdatedAt')) {
50+
if (property_exists($data, 'UpdatedAt') && $data->{'UpdatedAt'} !== null) {
5251
$object->setUpdatedAt($data->{'UpdatedAt'});
5352
}
54-
if (property_exists($data, 'Spec')) {
53+
if (property_exists($data, 'Spec') && $data->{'Spec'} !== null) {
5554
$object->setSpec($this->denormalizer->denormalize($data->{'Spec'}, 'Docker\\API\\Model\\SwarmSpec', 'json', $context));
5655
}
5756

src/Normalizer/ClusterInfoVersionNormalizer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,10 +35,10 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\ClusterInfoVersion();
42-
if (property_exists($data, 'Index')) {
41+
if (property_exists($data, 'Index') && $data->{'Index'} !== null) {
4342
$object->setIndex($data->{'Index'});
4443
}
4544

src/Normalizer/ConfigHealthcheckNormalizer.php

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,23 +35,23 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\ConfigHealthcheck();
42-
if (property_exists($data, 'Test')) {
41+
if (property_exists($data, 'Test') && $data->{'Test'} !== null) {
4342
$values = [];
4443
foreach ($data->{'Test'} as $value) {
4544
$values[] = $value;
4645
}
4746
$object->setTest($values);
4847
}
49-
if (property_exists($data, 'Interval')) {
48+
if (property_exists($data, 'Interval') && $data->{'Interval'} !== null) {
5049
$object->setInterval($data->{'Interval'});
5150
}
52-
if (property_exists($data, 'Timeout')) {
51+
if (property_exists($data, 'Timeout') && $data->{'Timeout'} !== null) {
5352
$object->setTimeout($data->{'Timeout'});
5453
}
55-
if (property_exists($data, 'Retries')) {
54+
if (property_exists($data, 'Retries') && $data->{'Retries'} !== null) {
5655
$object->setRetries($data->{'Retries'});
5756
}
5857

src/Normalizer/ConfigNormalizer.php

Lines changed: 26 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,51 +35,51 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\Config();
42-
if (property_exists($data, 'Hostname')) {
41+
if (property_exists($data, 'Hostname') && $data->{'Hostname'} !== null) {
4342
$object->setHostname($data->{'Hostname'});
4443
}
45-
if (property_exists($data, 'Domainname')) {
44+
if (property_exists($data, 'Domainname') && $data->{'Domainname'} !== null) {
4645
$object->setDomainname($data->{'Domainname'});
4746
}
48-
if (property_exists($data, 'User')) {
47+
if (property_exists($data, 'User') && $data->{'User'} !== null) {
4948
$object->setUser($data->{'User'});
5049
}
51-
if (property_exists($data, 'AttachStdin')) {
50+
if (property_exists($data, 'AttachStdin') && $data->{'AttachStdin'} !== null) {
5251
$object->setAttachStdin($data->{'AttachStdin'});
5352
}
54-
if (property_exists($data, 'AttachStdout')) {
53+
if (property_exists($data, 'AttachStdout') && $data->{'AttachStdout'} !== null) {
5554
$object->setAttachStdout($data->{'AttachStdout'});
5655
}
57-
if (property_exists($data, 'AttachStderr')) {
56+
if (property_exists($data, 'AttachStderr') && $data->{'AttachStderr'} !== null) {
5857
$object->setAttachStderr($data->{'AttachStderr'});
5958
}
60-
if (property_exists($data, 'ExposedPorts')) {
59+
if (property_exists($data, 'ExposedPorts') && $data->{'ExposedPorts'} !== null) {
6160
$values = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
6261
foreach ($data->{'ExposedPorts'} as $key => $value) {
6362
$values[$key] = $value;
6463
}
6564
$object->setExposedPorts($values);
6665
}
67-
if (property_exists($data, 'Tty')) {
66+
if (property_exists($data, 'Tty') && $data->{'Tty'} !== null) {
6867
$object->setTty($data->{'Tty'});
6968
}
70-
if (property_exists($data, 'OpenStdin')) {
69+
if (property_exists($data, 'OpenStdin') && $data->{'OpenStdin'} !== null) {
7170
$object->setOpenStdin($data->{'OpenStdin'});
7271
}
73-
if (property_exists($data, 'StdinOnce')) {
72+
if (property_exists($data, 'StdinOnce') && $data->{'StdinOnce'} !== null) {
7473
$object->setStdinOnce($data->{'StdinOnce'});
7574
}
76-
if (property_exists($data, 'Env')) {
75+
if (property_exists($data, 'Env') && $data->{'Env'} !== null) {
7776
$values_1 = [];
7877
foreach ($data->{'Env'} as $value_1) {
7978
$values_1[] = $value_1;
8079
}
8180
$object->setEnv($values_1);
8281
}
83-
if (property_exists($data, 'Cmd')) {
82+
if (property_exists($data, 'Cmd') && $data->{'Cmd'} !== null) {
8483
$value_2 = $data->{'Cmd'};
8584
if (is_array($data->{'Cmd'})) {
8685
$values_2 = [];
@@ -94,22 +93,22 @@ public function denormalize($data, $class, $format = null, array $context = [])
9493
}
9594
$object->setCmd($value_2);
9695
}
97-
if (property_exists($data, 'Healthcheck')) {
96+
if (property_exists($data, 'Healthcheck') && $data->{'Healthcheck'} !== null) {
9897
$object->setHealthcheck($this->denormalizer->denormalize($data->{'Healthcheck'}, 'Docker\\API\\Model\\ConfigHealthcheck', 'json', $context));
9998
}
100-
if (property_exists($data, 'ArgsEscaped')) {
99+
if (property_exists($data, 'ArgsEscaped') && $data->{'ArgsEscaped'} !== null) {
101100
$object->setArgsEscaped($data->{'ArgsEscaped'});
102101
}
103-
if (property_exists($data, 'Image')) {
102+
if (property_exists($data, 'Image') && $data->{'Image'} !== null) {
104103
$object->setImage($data->{'Image'});
105104
}
106-
if (property_exists($data, 'Volumes')) {
105+
if (property_exists($data, 'Volumes') && $data->{'Volumes'} !== null) {
107106
$object->setVolumes($this->denormalizer->denormalize($data->{'Volumes'}, 'Docker\\API\\Model\\ConfigVolumes', 'json', $context));
108107
}
109-
if (property_exists($data, 'WorkingDir')) {
108+
if (property_exists($data, 'WorkingDir') && $data->{'WorkingDir'} !== null) {
110109
$object->setWorkingDir($data->{'WorkingDir'});
111110
}
112-
if (property_exists($data, 'Entrypoint')) {
111+
if (property_exists($data, 'Entrypoint') && $data->{'Entrypoint'} !== null) {
113112
$value_4 = $data->{'Entrypoint'};
114113
if (is_array($data->{'Entrypoint'})) {
115114
$values_3 = [];
@@ -123,33 +122,33 @@ public function denormalize($data, $class, $format = null, array $context = [])
123122
}
124123
$object->setEntrypoint($value_4);
125124
}
126-
if (property_exists($data, 'NetworkDisabled')) {
125+
if (property_exists($data, 'NetworkDisabled') && $data->{'NetworkDisabled'} !== null) {
127126
$object->setNetworkDisabled($data->{'NetworkDisabled'});
128127
}
129-
if (property_exists($data, 'MacAddress')) {
128+
if (property_exists($data, 'MacAddress') && $data->{'MacAddress'} !== null) {
130129
$object->setMacAddress($data->{'MacAddress'});
131130
}
132-
if (property_exists($data, 'OnBuild')) {
131+
if (property_exists($data, 'OnBuild') && $data->{'OnBuild'} !== null) {
133132
$values_4 = [];
134133
foreach ($data->{'OnBuild'} as $value_6) {
135134
$values_4[] = $value_6;
136135
}
137136
$object->setOnBuild($values_4);
138137
}
139-
if (property_exists($data, 'Labels')) {
138+
if (property_exists($data, 'Labels') && $data->{'Labels'} !== null) {
140139
$values_5 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
141140
foreach ($data->{'Labels'} as $key_1 => $value_7) {
142141
$values_5[$key_1] = $value_7;
143142
}
144143
$object->setLabels($values_5);
145144
}
146-
if (property_exists($data, 'StopSignal')) {
145+
if (property_exists($data, 'StopSignal') && $data->{'StopSignal'} !== null) {
147146
$object->setStopSignal($data->{'StopSignal'});
148147
}
149-
if (property_exists($data, 'StopTimeout')) {
148+
if (property_exists($data, 'StopTimeout') && $data->{'StopTimeout'} !== null) {
150149
$object->setStopTimeout($data->{'StopTimeout'});
151150
}
152-
if (property_exists($data, 'Shell')) {
151+
if (property_exists($data, 'Shell') && $data->{'Shell'} !== null) {
153152
$values_6 = [];
154153
foreach ($data->{'Shell'} as $value_8) {
155154
$values_6[] = $value_8;

src/Normalizer/ConfigVolumesNormalizer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,10 +35,10 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\ConfigVolumes();
42-
if (property_exists($data, 'additionalProperties')) {
41+
if (property_exists($data, 'additionalProperties') && $data->{'additionalProperties'} !== null) {
4342
$object->setAdditionalProperties($data->{'additionalProperties'});
4443
}
4544

src/Normalizer/ContainerSummaryItemHostConfigNormalizer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
namespace Docker\API\Normalizer;
1212

13-
use Symfony\Component\Serializer\Exception\InvalidArgumentException;
1413
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareInterface;
1514
use Symfony\Component\Serializer\Normalizer\DenormalizerAwareTrait;
1615
use Symfony\Component\Serializer\Normalizer\DenormalizerInterface;
@@ -36,10 +35,10 @@ public function supportsNormalization($data, $format = null)
3635
public function denormalize($data, $class, $format = null, array $context = [])
3736
{
3837
if (!is_object($data)) {
39-
throw new InvalidArgumentException();
38+
return null;
4039
}
4140
$object = new \Docker\API\Model\ContainerSummaryItemHostConfig();
42-
if (property_exists($data, 'NetworkMode')) {
41+
if (property_exists($data, 'NetworkMode') && $data->{'NetworkMode'} !== null) {
4342
$object->setNetworkMode($data->{'NetworkMode'});
4443
}
4544

0 commit comments

Comments
 (0)