diff --git a/composer.lock b/composer.lock index 299417d..950b485 100644 --- a/composer.lock +++ b/composer.lock @@ -2457,16 +2457,16 @@ }, { "name": "symfony/deprecation-contracts", - "version": "v3.3.0", + "version": "v3.5.1", "source": { "type": "git", "url": "https://github.com/symfony/deprecation-contracts.git", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf" + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/7c3aff79d10325257a001fcf92d991f24fc967cf", - "reference": "7c3aff79d10325257a001fcf92d991f24fc967cf", + "url": "https://api.github.com/repos/symfony/deprecation-contracts/zipball/74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", + "reference": "74c71c939a79f7d5bf3c1ce9f5ea37ba0114c6f6", "shasum": "" }, "require": { @@ -2475,7 +2475,7 @@ "type": "library", "extra": { "branch-alias": { - "dev-main": "3.4-dev" + "dev-main": "3.5-dev" }, "thanks": { "name": "symfony/contracts", @@ -2504,7 +2504,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.3.0" + "source": "https://github.com/symfony/deprecation-contracts/tree/v3.5.1" }, "funding": [ { @@ -2520,7 +2520,7 @@ "type": "tidelift" } ], - "time": "2023-05-23T14:45:45+00:00" + "time": "2024-09-25T14:20:29+00:00" }, { "name": "symfony/error-handler", @@ -3506,20 +3506,20 @@ }, { "name": "symfony/polyfill-mbstring", - "version": "v1.27.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-mbstring.git", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534" + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/8ad114f6b39e2c98a8b0e3bd907732c207c2b534", - "reference": "8ad114f6b39e2c98a8b0e3bd907732c207c2b534", + "url": "https://api.github.com/repos/symfony/polyfill-mbstring/zipball/85181ba99b2345b0ef10ce42ecac37612d9fd341", + "reference": "85181ba99b2345b0ef10ce42ecac37612d9fd341", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "provide": { "ext-mbstring": "*" @@ -3529,9 +3529,6 @@ }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3569,7 +3566,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-mbstring/tree/v1.31.0" }, "funding": [ { @@ -3585,43 +3582,32 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php72", - "version": "v1.27.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97" + "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/869329b1e9894268a8a61dabb69153029b7a8c97", - "reference": "869329b1e9894268a8a61dabb69153029b7a8c97", + "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", + "reference": "fa2ae56c44f03bed91a39bfc9822e31e7c5c38ce", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, - "type": "library", + "type": "metapackage", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" } }, - "autoload": { - "files": [ - "bootstrap.php" - ], - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - } - }, "notification-url": "https://packagist.org/downloads/", "license": [ "MIT" @@ -3645,7 +3631,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php72/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php72/tree/v1.31.0" }, "funding": [ { @@ -3661,30 +3647,27 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php80", - "version": "v1.27.0", + "version": "v1.31.0", "source": { "type": "git", "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936" + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", - "reference": "7a6ff3f1959bb01aefccb463a0f2cd3d3d2fd936", + "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", + "reference": "60328e362d4c2c802a54fcbf04f9d3fb892b4cf8", "shasum": "" }, "require": { - "php": ">=7.1" + "php": ">=7.2" }, "type": "library", "extra": { - "branch-alias": { - "dev-main": "1.27-dev" - }, "thanks": { "name": "symfony/polyfill", "url": "https://github.com/symfony/polyfill" @@ -3728,7 +3711,7 @@ "shim" ], "support": { - "source": "https://github.com/symfony/polyfill-php80/tree/v1.27.0" + "source": "https://github.com/symfony/polyfill-php80/tree/v1.31.0" }, "funding": [ { @@ -3744,7 +3727,7 @@ "type": "tidelift" } ], - "time": "2022-11-03T14:55:06+00:00" + "time": "2024-09-09T11:45:10+00:00" }, { "name": "symfony/polyfill-php83", @@ -4466,16 +4449,16 @@ }, { "name": "symfony/var-dumper", - "version": "v6.3.3", + "version": "v6.4.15", "source": { "type": "git", "url": "https://github.com/symfony/var-dumper.git", - "reference": "77fb4f2927f6991a9843633925d111147449ee7a" + "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/var-dumper/zipball/77fb4f2927f6991a9843633925d111147449ee7a", - "reference": "77fb4f2927f6991a9843633925d111147449ee7a", + "url": "https://api.github.com/repos/symfony/var-dumper/zipball/38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", + "reference": "38254d5a5ac2e61f2b52f9caf54e7aa3c9d36b80", "shasum": "" }, "require": { @@ -4488,10 +4471,11 @@ }, "require-dev": { "ext-iconv": "*", - "symfony/console": "^5.4|^6.0", - "symfony/http-kernel": "^5.4|^6.0", - "symfony/process": "^5.4|^6.0", - "symfony/uid": "^5.4|^6.0", + "symfony/console": "^5.4|^6.0|^7.0", + "symfony/error-handler": "^6.3|^7.0", + "symfony/http-kernel": "^5.4|^6.0|^7.0", + "symfony/process": "^5.4|^6.0|^7.0", + "symfony/uid": "^5.4|^6.0|^7.0", "twig/twig": "^2.13|^3.0.4" }, "bin": [ @@ -4530,7 +4514,7 @@ "dump" ], "support": { - "source": "https://github.com/symfony/var-dumper/tree/v6.3.3" + "source": "https://github.com/symfony/var-dumper/tree/v6.4.15" }, "funding": [ { @@ -4546,7 +4530,7 @@ "type": "tidelift" } ], - "time": "2023-07-31T07:08:24+00:00" + "time": "2024-11-08T15:28:48+00:00" }, { "name": "symfony/yaml", @@ -7795,5 +7779,5 @@ "php": "^8.1" }, "platform-dev": [], - "plugin-api-version": "2.3.0" + "plugin-api-version": "2.6.0" } diff --git a/config/asseco-open-api.php b/config/asseco-open-api.php index faee632..75f69eb 100644 --- a/config/asseco-open-api.php +++ b/config/asseco-open-api.php @@ -12,23 +12,23 @@ /** * Namespace for Laravel models. */ - 'model_namespace' => 'App\\Models\\', + 'model_namespace' => 'App\\Models\\', /** * General OpenApi properties to generate. */ - 'general' => [ + 'general' => [ 'openapi' => '3.0.0', 'info' => [ - 'title' => ucfirst(config('app.name')) . ' API', + 'title' => ucfirst(config('app.name')) . ' API', 'description' => 'Generated with this [awesome package](https://github.com/asseco-voice/laravel-open-api)!', - 'version' => '0.0.1', + 'version' => '0.0.1', ], 'servers' => [ [ - 'url' => config('app.url'), + 'url' => config('app.url'), 'description' => 'Default server', ], ], @@ -48,14 +48,14 @@ /** * Name of generated file. */ - 'file_name' => 'open-api.yml', + 'file_name' => 'open-api.yml', /** * Rules for excluding certain rules. */ - 'exclude' => [ + 'exclude' => [ // Partial match. Using 'index' will match '*index*'. - 'route_name' => [ + 'route_name' => [ 'horizon', ], // Exact match by controller full namespace @@ -68,12 +68,12 @@ 'global_headers' => '', 'data_types' => [ - 'string' => StringType::class, - 'number' => NumberType::class, + 'string' => StringType::class, + 'number' => NumberType::class, 'integer' => IntegerType::class, 'boolean' => BooleanType::class, - 'array' => ArrayType::class, - 'object' => ObjectType::class, + 'array' => ArrayType::class, + 'object' => ObjectType::class, ], /** @@ -84,7 +84,7 @@ /** * Get additional command output (for debugging purposes). Command flag, not to be used manually. */ - 'verbose' => false, + 'verbose' => false, /** * Prepend service name to operationId. diff --git a/src/Handlers/AppendHandler.php b/src/Handlers/AppendHandler.php index d02fdd4..be6bb6a 100644 --- a/src/Handlers/AppendHandler.php +++ b/src/Handlers/AppendHandler.php @@ -36,7 +36,7 @@ protected static function parseTag($tag, $namespace): array self::verifyModelExists($model); return [ - 'key' => $key, + 'key' => $key, 'model' => new $model, ]; } diff --git a/src/Specification/Paths/Operations/Parameters/PathParameter.php b/src/Specification/Paths/Operations/Parameters/PathParameter.php index 773ad06..093a5c1 100644 --- a/src/Specification/Paths/Operations/Parameters/PathParameter.php +++ b/src/Specification/Paths/Operations/Parameters/PathParameter.php @@ -28,10 +28,10 @@ public function addDescription(string $description): void public function toSchema(): array { $schema = [ - 'in' => 'path', - 'name' => $this->name, - 'schema' => $this->dataType->toSchema(), - 'required' => true, // OpenApi doesn't support optional path parameters like Laravel does + 'in' => 'path', + 'name' => $this->name, + 'schema' => $this->dataType->toSchema(), + 'required' => true, // OpenApi doesn't support optional path parameters like Laravel does 'description' => $this->description, ]; diff --git a/src/Specification/Shared/Properties.php b/src/Specification/Shared/Properties.php index 8833d6c..c6cd778 100644 --- a/src/Specification/Shared/Properties.php +++ b/src/Specification/Shared/Properties.php @@ -27,7 +27,7 @@ public function toSchema(): array return [ 'properties' => $properties, - 'required' => $required, + 'required' => $required, ]; } @@ -39,7 +39,7 @@ private function parseColumns(): array foreach ($this->modelColumns as $column) { if (is_string($column)) { $columnValues = [ - 'type' => 'string', + 'type' => 'string', 'example' => $column, ]; $properties = array_merge_recursive($properties, $columnValues); @@ -48,7 +48,7 @@ private function parseColumns(): array $columnValues = [ $column->name => [ - 'type' => $column->type, + 'type' => $column->type, 'description' => $column->description, //'format' => 'map something', ], diff --git a/src/Specification/Shared/Schema.php b/src/Specification/Shared/Schema.php index ecf99c8..d99dd9c 100644 --- a/src/Specification/Shared/Schema.php +++ b/src/Specification/Shared/Schema.php @@ -43,7 +43,7 @@ protected function appendProperties(Properties $properties): void protected function generateMultipleSchema(array $items): array { return [ - 'type' => 'array', + 'type' => 'array', 'items' => $items, ]; } diff --git a/src/TagExtractor.php b/src/TagExtractor.php index 1459285..b318ddd 100644 --- a/src/TagExtractor.php +++ b/src/TagExtractor.php @@ -168,9 +168,9 @@ public function getMethodData(string $candidate) $groups = $this->getGroup($candidate); return [ - 'summary' => $this->methodDocBlock->getShortDescription(), + 'summary' => $this->methodDocBlock->getShortDescription(), 'description' => $this->methodDocBlock->getLongDescription()->getContents(), - 'tags' => $groups, + 'tags' => $groups, ]; }