From 4f2b0315dbb7631cad5013d5d64823765459ab4d Mon Sep 17 00:00:00 2001 From: Cees-Jan Kiewiet Date: Sat, 10 Dec 2022 20:47:58 +0100 Subject: [PATCH] Support multiple types --- composer.lock | 265 ++++++++++++++++++------------------ openapi-client.yaml | 3 +- src/Generator/Client.php | 2 +- src/Generator/Operation.php | 4 +- src/Generator/Path.php | 2 +- src/Generator/WebHook.php | 3 + 6 files changed, 141 insertions(+), 138 deletions(-) diff --git a/composer.lock b/composer.lock index 1d15c62..77dafe7 100644 --- a/composer.lock +++ b/composer.lock @@ -78,16 +78,16 @@ }, { "name": "doctrine/annotations", - "version": "1.13.2", + "version": "1.13.3", "source": { "type": "git", "url": "https://github.com/doctrine/annotations.git", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08" + "reference": "648b0343343565c4a056bfc8392201385e8d89f0" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/doctrine/annotations/zipball/5b668aef16090008790395c02c893b1ba13f7e08", - "reference": "5b668aef16090008790395c02c893b1ba13f7e08", + "url": "https://api.github.com/repos/doctrine/annotations/zipball/648b0343343565c4a056bfc8392201385e8d89f0", + "reference": "648b0343343565c4a056bfc8392201385e8d89f0", "shasum": "" }, "require": { @@ -99,9 +99,10 @@ "require-dev": { "doctrine/cache": "^1.11 || ^2.0", "doctrine/coding-standard": "^6.0 || ^8.1", - "phpstan/phpstan": "^0.12.20", + "phpstan/phpstan": "^1.4.10 || ^1.8.0", "phpunit/phpunit": "^7.5 || ^8.0 || ^9.1.5", - "symfony/cache": "^4.4 || ^5.2" + "symfony/cache": "^4.4 || ^5.2", + "vimeo/psalm": "^4.10" }, "type": "library", "autoload": { @@ -144,9 +145,9 @@ ], "support": { "issues": "https://github.com/doctrine/annotations/issues", - "source": "https://github.com/doctrine/annotations/tree/1.13.2" + "source": "https://github.com/doctrine/annotations/tree/1.13.3" }, - "time": "2021-08-05T19:00:23+00:00" + "time": "2022-07-02T10:48:51+00:00" }, { "name": "doctrine/lexer", @@ -226,21 +227,21 @@ }, { "name": "jawira/case-converter", - "version": "v3.4.6", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/jawira/case-converter.git", - "reference": "2f284c0760ee8085ab463f57275cf1f887fb78ae" + "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/jawira/case-converter/zipball/2f284c0760ee8085ab463f57275cf1f887fb78ae", - "reference": "2f284c0760ee8085ab463f57275cf1f887fb78ae", + "url": "https://api.github.com/repos/jawira/case-converter/zipball/2be05b98dcb743bef60ab6f849145bd3434ed003", + "reference": "2be05b98dcb743bef60ab6f849145bd3434ed003", "shasum": "" }, "require": { "ext-mbstring": "*", - "php": "^7.1 || ^8.0" + "php": ">=7.4" }, "require-dev": { "behat/behat": "^3.0", @@ -287,9 +288,9 @@ ], "support": { "issues": "https://github.com/jawira/case-converter/issues", - "source": "https://github.com/jawira/case-converter/tree/v3.4.6" + "source": "https://github.com/jawira/case-converter/tree/v3.5.1" }, - "time": "2021-11-21T19:52:51+00:00" + "time": "2022-08-14T11:40:18+00:00" }, { "name": "justinrainbow/json-schema", @@ -363,42 +364,42 @@ }, { "name": "laminas/laminas-hydrator", - "version": "4.3.1", + "version": "4.10.0", "source": { "type": "git", "url": "https://github.com/laminas/laminas-hydrator.git", - "reference": "cc5ea6b42d318dbac872d94e8dca2d3013a37ab5" + "reference": "9917c999faa8acc13da51a9b0d12e513b5d26430" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/cc5ea6b42d318dbac872d94e8dca2d3013a37ab5", - "reference": "cc5ea6b42d318dbac872d94e8dca2d3013a37ab5", + "url": "https://api.github.com/repos/laminas/laminas-hydrator/zipball/9917c999faa8acc13da51a9b0d12e513b5d26430", + "reference": "9917c999faa8acc13da51a9b0d12e513b5d26430", "shasum": "" }, "require": { "laminas/laminas-stdlib": "^3.3", - "php": "^7.3 || ~8.0.0 || ~8.1.0", + "php": "~8.0.0 || ~8.1.0 || ~8.2.0", "webmozart/assert": "^1.10" }, "conflict": { + "laminas/laminas-servicemanager": "<3.14.0", "zendframework/zend-hydrator": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "laminas/laminas-eventmanager": "^3.2.1", - "laminas/laminas-modulemanager": "^2.8", - "laminas/laminas-serializer": "^2.9", - "laminas/laminas-servicemanager": "^3.3.2", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "~9.5.5", - "psalm/plugin-phpunit": "^0.16.1", - "psr/cache": "1.0.1", - "vimeo/psalm": "^4.8.1" + "laminas/laminas-coding-standard": "~2.4.0", + "laminas/laminas-eventmanager": "^3.6", + "laminas/laminas-modulemanager": "^2.14.0", + "laminas/laminas-serializer": "^2.14.0", + "laminas/laminas-servicemanager": "^3.19", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0" }, "suggest": { "laminas/laminas-eventmanager": "^3.2, to support aggregate hydrator usage", "laminas/laminas-serializer": "^2.9, to use the SerializableStrategy", - "laminas/laminas-servicemanager": "^3.3, to support hydrator plugin manager usage" + "laminas/laminas-servicemanager": "^3.14, to support hydrator plugin manager usage" }, "type": "library", "extra": { @@ -436,34 +437,34 @@ "type": "community_bridge" } ], - "time": "2021-09-09T09:55:00+00:00" + "time": "2022-12-05T18:17:44+00:00" }, { "name": "laminas/laminas-stdlib", - "version": "3.7.1", + "version": "3.16.1", "source": { "type": "git", "url": "https://github.com/laminas/laminas-stdlib.git", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325" + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/bcd869e2fe88d567800057c1434f2380354fe325", - "reference": "bcd869e2fe88d567800057c1434f2380354fe325", + "url": "https://api.github.com/repos/laminas/laminas-stdlib/zipball/f4f773641807c7ccee59b758bfe4ac4ba33ecb17", + "reference": "f4f773641807c7ccee59b758bfe4ac4ba33ecb17", "shasum": "" }, "require": { - "php": "^7.3 || ~8.0.0 || ~8.1.0" + "php": "~8.0.0 || ~8.1.0 || ~8.2.0" }, "conflict": { "zendframework/zend-stdlib": "*" }, "require-dev": { - "laminas/laminas-coding-standard": "~2.3.0", - "phpbench/phpbench": "^1.0", - "phpunit/phpunit": "^9.3.7", - "psalm/plugin-phpunit": "^0.16.0", - "vimeo/psalm": "^4.7" + "laminas/laminas-coding-standard": "^2.4.0", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "autoload": { @@ -495,7 +496,7 @@ "type": "community_bridge" } ], - "time": "2022-01-21T15:50:46+00:00" + "time": "2022-12-03T18:48:01+00:00" }, { "name": "league/openapi-psr7-validator", @@ -560,36 +561,38 @@ }, { "name": "league/uri", - "version": "6.6.0", + "version": "6.8.0", "source": { "type": "git", "url": "https://github.com/thephpleague/uri.git", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298" + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/thephpleague/uri/zipball/4147f19b9de3b5af6a258f35d7a0efbbf9963298", - "reference": "4147f19b9de3b5af6a258f35d7a0efbbf9963298", + "url": "https://api.github.com/repos/thephpleague/uri/zipball/a700b4656e4c54371b799ac61e300ab25a2d1d39", + "reference": "a700b4656e4c54371b799ac61e300ab25a2d1d39", "shasum": "" }, "require": { "ext-json": "*", "league/uri-interfaces": "^2.3", - "php": "^7.4 || ^8.0", - "psr/http-message": "^1.0" + "php": "^8.1", + "psr/http-message": "^1.0.1" }, "conflict": { "league/uri-schemes": "^1.0" }, "require-dev": { - "friendsofphp/php-cs-fixer": "^v3.3.2", - "php-http/psr7-integration-tests": "^1.1", - "phpstan/phpstan": "^1.2.0", + "friendsofphp/php-cs-fixer": "^v3.9.5", + "nyholm/psr7": "^1.5.1", + "php-http/psr7-integration-tests": "^1.1.1", + "phpbench/phpbench": "^1.2.6", + "phpstan/phpstan": "^1.8.5", "phpstan/phpstan-deprecation-rules": "^1.0", - "phpstan/phpstan-phpunit": "^1.0.0", - "phpstan/phpstan-strict-rules": "^1.1.0", - "phpunit/phpunit": "^9.5.10", - "psr/http-factory": "^1.0" + "phpstan/phpstan-phpunit": "^1.1.1", + "phpstan/phpstan-strict-rules": "^1.4.3", + "phpunit/phpunit": "^9.5.24", + "psr/http-factory": "^1.0.1" }, "suggest": { "ext-fileinfo": "Needed to create Data URI from a filepath", @@ -646,7 +649,7 @@ "docs": "https://uri.thephpleague.com", "forum": "https://thephpleague.slack.com", "issues": "https://github.com/thephpleague/uri/issues", - "source": "https://github.com/thephpleague/uri/tree/6.6.0" + "source": "https://github.com/thephpleague/uri/tree/6.8.0" }, "funding": [ { @@ -654,7 +657,7 @@ "type": "github" } ], - "time": "2022-05-28T05:44:35+00:00" + "time": "2022-09-13T19:58:47+00:00" }, { "name": "league/uri-interfaces", @@ -729,16 +732,16 @@ }, { "name": "nikic/php-parser", - "version": "v4.14.0", + "version": "v4.15.2", "source": { "type": "git", "url": "https://github.com/nikic/PHP-Parser.git", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1" + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/34bea19b6e03d8153165d8f30bba4c3be86184c1", - "reference": "34bea19b6e03d8153165d8f30bba4c3be86184c1", + "url": "https://api.github.com/repos/nikic/PHP-Parser/zipball/f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", + "reference": "f59bbe44bf7d96f24f3e2b4ddc21cd52c1d2adbc", "shasum": "" }, "require": { @@ -779,34 +782,34 @@ ], "support": { "issues": "https://github.com/nikic/PHP-Parser/issues", - "source": "https://github.com/nikic/PHP-Parser/tree/v4.14.0" + "source": "https://github.com/nikic/PHP-Parser/tree/v4.15.2" }, - "time": "2022-05-31T20:59:12+00:00" + "time": "2022-11-12T15:38:23+00:00" }, { "name": "ocramius/code-generator-utils", - "version": "1.4.0", + "version": "1.6.0", "source": { "type": "git", "url": "https://github.com/Ocramius/CodeGenerationUtils.git", - "reference": "766904643c1b142599d6246342f1b348b40f89b4" + "reference": "6c12bc604278932a82138e37aa699ba57a476735" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/CodeGenerationUtils/zipball/766904643c1b142599d6246342f1b348b40f89b4", - "reference": "766904643c1b142599d6246342f1b348b40f89b4", + "url": "https://api.github.com/repos/Ocramius/CodeGenerationUtils/zipball/6c12bc604278932a82138e37aa699ba57a476735", + "reference": "6c12bc604278932a82138e37aa699ba57a476735", "shasum": "" }, "require": { - "nikic/php-parser": "^4.13.2", - "php": "~8.0.0 || ~8.1.0" + "nikic/php-parser": "^4.15.2", + "php": "~8.1.0 || ~8.2.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0.0", - "phpunit/phpunit": "^9.5.11", - "psalm/plugin-phpunit": "^0.16.1", - "roave/infection-static-analysis-plugin": "^1.14.0", - "vimeo/psalm": "^4.18" + "doctrine/coding-standard": "^10.0.0", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "roave/infection-static-analysis-plugin": "^1.26.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "extra": { @@ -841,7 +844,7 @@ ], "support": { "issues": "https://github.com/Ocramius/CodeGenerationUtils/issues", - "source": "https://github.com/Ocramius/CodeGenerationUtils/tree/1.4.0" + "source": "https://github.com/Ocramius/CodeGenerationUtils/tree/1.6.0" }, "funding": [ { @@ -849,37 +852,35 @@ "type": "github" } ], - "time": "2022-01-11T09:52:57+00:00" + "time": "2022-12-01T14:52:22+00:00" }, { "name": "ocramius/generated-hydrator", - "version": "4.3.0", + "version": "4.5.0", "source": { "type": "git", "url": "https://github.com/Ocramius/GeneratedHydrator.git", - "reference": "aff251ceebb89406d2434f95b8de180935d48c4e" + "reference": "9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/Ocramius/GeneratedHydrator/zipball/aff251ceebb89406d2434f95b8de180935d48c4e", - "reference": "aff251ceebb89406d2434f95b8de180935d48c4e", + "url": "https://api.github.com/repos/Ocramius/GeneratedHydrator/zipball/9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a", + "reference": "9537dff80a2c0d99eee4d45dacf4cb5ddf30f82a", "shasum": "" }, "require": { - "laminas/laminas-hydrator": "^4.2.0", - "nikic/php-parser": "^4.13.2", - "ocramius/code-generator-utils": "^1.3.0", - "php": "~8.0.0 || ~8.1.0" + "laminas/laminas-hydrator": "^4.8.0", + "nikic/php-parser": "^4.15.2", + "ocramius/code-generator-utils": "^1.6.0", + "php": "~8.1.0 || ~8.2.0" }, "require-dev": { - "doctrine/coding-standard": "^9.0.0", - "laminas/laminas-servicemanager": "^3.8.0", - "laminas/laminas-stdlib": "^3.6.0", - "phpbench/phpbench": "^1.2.3", - "phpunit/phpunit": "^9.5.11", - "psalm/plugin-phpunit": "^0.16.1", - "roave/infection-static-analysis-plugin": "^1.14.0", - "vimeo/psalm": "^4.18.1" + "doctrine/coding-standard": "^10.0.0", + "phpbench/phpbench": "^1.2.7", + "phpunit/phpunit": "^9.5.26", + "psalm/plugin-phpunit": "^0.18.3", + "roave/infection-static-analysis-plugin": "^1.26.0", + "vimeo/psalm": "^5.0.0" }, "type": "library", "autoload": { @@ -909,7 +910,7 @@ ], "support": { "issues": "https://github.com/Ocramius/GeneratedHydrator/issues", - "source": "https://github.com/Ocramius/GeneratedHydrator/tree/4.3.0" + "source": "https://github.com/Ocramius/GeneratedHydrator/tree/4.5.0" }, "funding": [ { @@ -921,7 +922,7 @@ "type": "tidelift" } ], - "time": "2022-01-11T10:30:57+00:00" + "time": "2022-12-01T16:00:51+00:00" }, { "name": "psr/cache", @@ -1382,16 +1383,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.1.0", + "version": "v3.2.0", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918" + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", - "reference": "07f1b9cc2ffee6aaafcf4b710fbc38ff736bd918", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/1ee04c65529dea5d8744774d474e7cbd2f1206d3", + "reference": "1ee04c65529dea5d8744774d474e7cbd2f1206d3", "shasum": "" }, "require": { @@ -1400,7 +1401,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.1-dev" + "dev-main": "3.3-dev" }, "thanks": { "name": "symfony/contracts", @@ -1429,7 +1430,7 @@ "description": "A generic function and convention to trigger deprecation notices", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/deprecation-contracts/tree/v3.1.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.2.0" }, "funding": [ { @@ -1445,20 +1446,20 @@ "type": "tidelift" } ], - "time": "2022-02-25T11:15:52+00:00" + "time": "2022-11-25T10:21:52+00:00" }, { "name": "symfony/polyfill-ctype", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-ctype.git", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4" + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", - "reference": "6fd1b9a79f6e3cf65f9e679b23af304cd9e010d4", + "url": "https://api.github.com/repos/symfony/polyfill-ctype/zipball/5bbc823adecdae860bb64756d639ecfec17b050a", + "reference": "5bbc823adecdae860bb64756d639ecfec17b050a", "shasum": "" }, "require": { @@ -1473,7 +1474,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1511,7 +1512,7 @@ "portable" ], "support": { - "source": "https://github.com/symfony/polyfill-ctype/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-ctype/tree/v1.27.0" }, "funding": [ { @@ -1527,20 +1528,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/polyfill-mbstring", - "version": "v1.26.0", + "version": "v1.27.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e" + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", - "reference": "9344f9cb97f3b19424af1a21a3b0e75b0a7d8d7e", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", "shasum": "" }, "require": { @@ -1555,7 +1556,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "1.26-dev" + "dev-main": "1.27-dev" }, "thanks": { "name": "symfony/polyfill", @@ -1594,7 +1595,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.26.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" }, "funding": [ { @@ -1610,20 +1611,20 @@ "type": "tidelift" } ], - "time": "2022-05-24T11:49:31+00:00" + "time": "2022-11-03T14:55:06+00:00" }, { "name": "symfony/yaml", - "version": "v5.4.3", + "version": "v5.4.16", "source": { "type": "git", "url": "https://github.com/symfony/yaml.git", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2" + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/yaml/zipball/e80f87d2c9495966768310fc531b487ce64237a2", - "reference": "e80f87d2c9495966768310fc531b487ce64237a2", + "url": "https://api.github.com/repos/symfony/yaml/zipball/ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", + "reference": "ebd37c71f62d5ec5f6e27de3e06fee492d4c6298", "shasum": "" }, "require": { @@ -1669,7 +1670,7 @@ "description": "Loads and dumps YAML files", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/yaml/tree/v5.4.3" + "source": "https://github.com/symfony/yaml/tree/v5.4.16" }, "funding": [ { @@ -1685,20 +1686,20 @@ "type": "tidelift" } ], - "time": "2022-01-26T16:32:32+00:00" + "time": "2022-11-25T16:04:03+00:00" }, { "name": "twig/twig", - "version": "v3.4.1", + "version": "v3.4.3", "source": { "type": "git", "url": "https://github.com/twigphp/Twig.git", - "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342" + "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/twigphp/Twig/zipball/e939eae92386b69b49cfa4599dd9bead6bf4a342", - "reference": "e939eae92386b69b49cfa4599dd9bead6bf4a342", + "url": "https://api.github.com/repos/twigphp/Twig/zipball/c38fd6b0b7f370c198db91ffd02e23b517426b58", + "reference": "c38fd6b0b7f370c198db91ffd02e23b517426b58", "shasum": "" }, "require": { @@ -1749,7 +1750,7 @@ ], "support": { "issues": "https://github.com/twigphp/Twig/issues", - "source": "https://github.com/twigphp/Twig/tree/v3.4.1" + "source": "https://github.com/twigphp/Twig/tree/v3.4.3" }, "funding": [ { @@ -1761,7 +1762,7 @@ "type": "tidelift" } ], - "time": "2022-05-17T05:48:52+00:00" + "time": "2022-09-28T08:42:51+00:00" }, { "name": "webmozart/assert", @@ -1877,12 +1878,12 @@ "source": { "type": "git", "url": "https://github.com/WyriHaximus/php-hydrator.git", - "reference": "1a02769dfa26f2e7c196ca1d2fbd82cc580ad394" + "reference": "9548bf4685e4b44504af0890262390d775e66063" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/WyriHaximus/php-hydrator/zipball/1a02769dfa26f2e7c196ca1d2fbd82cc580ad394", - "reference": "1a02769dfa26f2e7c196ca1d2fbd82cc580ad394", + "url": "https://api.github.com/repos/WyriHaximus/php-hydrator/zipball/9548bf4685e4b44504af0890262390d775e66063", + "reference": "9548bf4685e4b44504af0890262390d775e66063", "shasum": "" }, "require": { @@ -1922,7 +1923,7 @@ "type": "github" } ], - "time": "2021-11-16T08:00:53+00:00" + "time": "2022-08-07T12:37:28+00:00" } ], "packages-dev": [], diff --git a/openapi-client.yaml b/openapi-client.yaml index 025d0d2..2c25a1b 100644 --- a/openapi-client.yaml +++ b/openapi-client.yaml @@ -1,4 +1,3 @@ -spec: https://raw.githubusercontent.com/octokit/webhooks/openapi/payload-schemas/openapi-schema.yml -#spec: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions/api.github.com/api.github.com.yaml +spec: https://raw.githubusercontent.com/github/rest-api-description/main/descriptions-next/api.github.com/api.github.com.yaml namespace: ApiClients\Client\Github destination: generated diff --git a/src/Generator/Client.php b/src/Generator/Client.php index 284eb5c..4aae30a 100644 --- a/src/Generator/Client.php +++ b/src/Generator/Client.php @@ -41,7 +41,7 @@ public static function generate(string $operationGroup, string $namespace, strin 'int', '', 'bool', - ], $parameter->schema->type) + ], implode('|', is_array($parameter->schema->type) ? $parameter->schema->type : [$parameter->schema->type])) ); } if ($parameter->schema->default !== null) { diff --git a/src/Generator/Operation.php b/src/Generator/Operation.php index 543b485..7f1e144 100644 --- a/src/Generator/Operation.php +++ b/src/Generator/Operation.php @@ -67,7 +67,7 @@ public static function generate(string $path, string $method, string $namespace, 'int', '', 'bool', - ], $parameter->schema->type)); + ], implode('|', is_array($parameter->schema->type) ? $parameter->schema->type : [$parameter->schema->type]))); } $class->addStmt($paramterStmt->makeReadonly()->makePrivate()); @@ -82,7 +82,7 @@ public static function generate(string $path, string $method, string $namespace, 'int', '', 'bool', - ], $parameter->schema->type) + ], implode('|', is_array($parameter->schema->type) ? $parameter->schema->type : [$parameter->schema->type])) ); } if ($parameter->schema->default !== null) { diff --git a/src/Generator/Path.php b/src/Generator/Path.php index ef52717..effec22 100644 --- a/src/Generator/Path.php +++ b/src/Generator/Path.php @@ -51,7 +51,7 @@ public static function generate(string $path, string $namespace, string $baseNam 'int', '', 'bool', - ], $parameter->schema->type) + ], implode('|', is_array($parameter->schema->type) ? $parameter->schema->type : [$parameter->schema->type])) ); } if ($parameter->schema->default !== null) { diff --git a/src/Generator/WebHook.php b/src/Generator/WebHook.php index 442d9da..e05927b 100644 --- a/src/Generator/WebHook.php +++ b/src/Generator/WebHook.php @@ -93,6 +93,9 @@ public static function generate(string $path, string $namespace, string $baseNam $tmts[] = new Node\Stmt\Throw_(new Node\Expr\Variable($gotoLabels)); } else { foreach ($content->schema->oneOf as $oneOfSchema) { + if (!array_key_exists(spl_object_hash($oneOfSchema), $schemaClassNameMap)) { + continue; // TODO: Remove to make sure we have all schemas mapped + } $tmts[] = new Node\Stmt\Label($gotoLabels); $gotoLabels++; $tmts[] = new Node\Stmt\TryCatch([