Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion docker-swagger.json
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
"type": "string"
},
"ExposedPorts": {
"type": "object",
"type": ["object","null"],
"additionalProperties": {
"type": "object",
"enum": [{}],
Expand Down
8 changes: 4 additions & 4 deletions generated/Model/ContainerConfig.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ class ContainerConfig
*/
protected $macAddress;
/**
* @var mixed[]
* @var mixed[]|null
*/
protected $exposedPorts;
/**
Expand Down Expand Up @@ -690,19 +690,19 @@ public function setMacAddress($macAddress = null)
}

/**
* @return mixed[]
* @return mixed[]|null
*/
public function getExposedPorts()
{
return $this->exposedPorts;
}

/**
* @param mixed[] $exposedPorts
* @param mixed[]|null $exposedPorts
*
* @return self
*/
public function setExposedPorts(\ArrayObject $exposedPorts = null)
public function setExposedPorts($exposedPorts = null)
{
$this->exposedPorts = $exposedPorts;

Expand Down
28 changes: 20 additions & 8 deletions generated/Normalizer/ContainerConfigNormalizer.php
Original file line number Diff line number Diff line change
Expand Up @@ -194,11 +194,18 @@ public function denormalize($data, $class, $format = null, array $context = [])
$object->setMacAddress($data->{'MacAddress'});
}
if (property_exists($data, 'ExposedPorts')) {
$values_7 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($data->{'ExposedPorts'} as $key_1 => $value_13) {
$values_7[$key_1] = $value_13;
$value_13 = $data->{'ExposedPorts'};
if (is_object($data->{'ExposedPorts'})) {
$values_7 = new \ArrayObject([], \ArrayObject::ARRAY_AS_PROPS);
foreach ($data->{'ExposedPorts'} as $key_1 => $value_14) {
$values_7[$key_1] = $value_14;
}
$value_13 = $values_7;
}
if (is_null($data->{'ExposedPorts'})) {
$value_13 = $data->{'ExposedPorts'};
}
$object->setExposedPorts($values_7);
$object->setExposedPorts($value_13);
}
if (property_exists($data, 'NetworkSettings')) {
$object->setNetworkSettings($this->serializer->deserialize($data->{'NetworkSettings'}, 'Docker\\API\\Model\\NetworkConfig', 'raw', $context));
Expand Down Expand Up @@ -359,13 +366,18 @@ public function normalize($object, $format = null, array $context = [])
if (null !== $object->getMacAddress()) {
$data->{'MacAddress'} = $object->getMacAddress();
}
if (null !== $object->getExposedPorts()) {
$value_13 = $object->getExposedPorts();
if (is_object($object->getExposedPorts())) {
$values_7 = new \stdClass();
foreach ($object->getExposedPorts() as $key_1 => $value_13) {
$values_7->{$key_1} = $value_13;
foreach ($object->getExposedPorts() as $key_1 => $value_14) {
$values_7->{$key_1} = $value_14;
}
$data->{'ExposedPorts'} = $values_7;
$value_13 = $values_7;
}
if (is_null($object->getExposedPorts())) {
$value_13 = $object->getExposedPorts();
}
$data->{'ExposedPorts'} = $value_13;
if (null !== $object->getNetworkSettings()) {
$data->{'NetworkSettings'} = $this->serializer->serialize($object->getNetworkSettings(), 'raw', $context);
}
Expand Down