Skip to content

Commit 17268ef

Browse files
authored
feat:(client): update client and event listener (#187)
* feat: update docker api spec to v1.51 add validation to jane config * fix(docker): fix spec with real world data.. * fix(docker): fix spec with real world data.. * feat(docker): fixed some schema definitions and disabled validation * feat(cli): add command to listen and show socket events
1 parent b4518bb commit 17268ef

File tree

174 files changed

+31481
-2987
lines changed

Some content is hidden

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

174 files changed

+31481
-2987
lines changed

.jane-openapi

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
declare(strict_types=1);
33

44
return [
5-
'openapi-file' => __DIR__ . '/spec/docker-v1.48-patched.yaml',
5+
'openapi-file' => __DIR__ . '/spec/docker-v1.51-patched.yaml',
66
'namespace' => 'WebProject\DockerApi\Library\Generated',
77
'directory' => __DIR__ . '/generated',
88
'strict' => true,
@@ -11,5 +11,5 @@ return [
1111
'clean-generated' => true,
1212
'reference' => true,
1313
'use-cacheable-supports-method' => true,
14-
'validation' => false,
14+
'validation' => false, // needs more patches to fully work
1515
];

.php-cs-fixer.php

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,10 +29,9 @@
2929
/** symfony set @see \PhpCsFixer\RuleSet\Sets\SymfonyRiskySet */
3030
'@Symfony:risky' => true,
3131
'@PhpCsFixer:risky' => true,
32-
'@PHP83Migration' => true,
32+
'@PHP8x3Migration' => true,
3333
'@DoctrineAnnotation' => true,
34-
// OEG Set:
35-
'binary_operator_spaces' => [
34+
'binary_operator_spaces' => [
3635
'default' => 'align',
3736
'operators' => [
3837
'??' => 'single_space',

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# php-docker-api-client - A PHP docker API client
22

33

4-
## Based on Docker API Version spec [docker-v1.48.yaml](spec/docker-v1.48.yaml)
5-
> patched types from real world [docker-v1.48-patched.yaml](spec/docker-v1.48-patched.yaml) responses and minor code patches (WIP)
4+
## Based on Docker API Version spec [docker-v1.51.yaml](spec/docker-v1.51.yaml)
5+
> converted to openapi v3.1.0 [docker-v1.51-patched.yaml](spec/docker-v1.51-patched.yaml) see [UPDATE.md](spec/UPDATE.md) how to upgrade client
66
77
## Example
88
```shell

bin/docker-api

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
declare(strict_types=1);
44

55
use Symfony\Component\Console\Application;
6+
use WebProject\DockerApiClient\Command\EventsListenCommand;
67
use WebProject\DockerApiClient\Command\ListContainersCommand;
78

89
if (!is_dir(dirname(__DIR__) . '/vendor')) {
@@ -18,7 +19,8 @@ require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
1819
return static function (array $context) {
1920
$application = new Application('Docker API', '@package_version@');
2021
$application->add(new ListContainersCommand());
21-
$application->setDefaultCommand('synchronize-hosts');
22+
$application->add(new EventsListenCommand());
23+
$application->setDefaultCommand('docker:list-containers');
2224

2325
return $application;
2426
};

composer.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,7 @@
4646
}
4747
},
4848
"scripts": {
49-
"generate": "XDEBUG_MODE=off jane-openapi generate"
49+
"generate": "XDEBUG_MODE=off jane-openapi generate",
50+
"tests": "vendor/bin/codecept run"
5051
}
5152
}

0 commit comments

Comments
 (0)