diff --git a/composer.lock b/composer.lock index 299417d..a058134 100644 --- a/composer.lock +++ b/composer.lock @@ -3907,16 +3907,16 @@ }, { "name": "symfony/process", - "version": "v6.3.2", + "version": "v6.4.14", "source": { "type": "git", "url": "https://github.com/symfony/process.git", - "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d" + "reference": "25214adbb0996d18112548de20c281be9f27279f" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/symfony/process/zipball/c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", - "reference": "c5ce962db0d9b6e80247ca5eb9af6472bd4d7b5d", + "url": "https://api.github.com/repos/symfony/process/zipball/25214adbb0996d18112548de20c281be9f27279f", + "reference": "25214adbb0996d18112548de20c281be9f27279f", "shasum": "" }, "require": { @@ -3948,7 +3948,7 @@ "description": "Executes commands in sub-processes", "homepage": "https://symfony.com", "support": { - "source": "https://github.com/symfony/process/tree/v6.3.2" + "source": "https://github.com/symfony/process/tree/v6.4.14" }, "funding": [ { @@ -3964,7 +3964,7 @@ "type": "tidelift" } ], - "time": "2023-07-12T16:00:22+00:00" + "time": "2024-11-06T09:25:01+00:00" }, { "name": "symfony/routing", @@ -7795,5 +7795,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, ]; }