diff --git a/docs/reference/processors.md b/docs/reference/processors.md index 4629e830..7375b25b 100644 --- a/docs/reference/processors.md +++ b/docs/reference/processors.md @@ -7,7 +7,7 @@ For improvements head over to [GitHub](https://github.com/zircote/swagger-php) a *Processors are listed in the default order of execution.* -## Processors +## Default Processors ### [DocBlockDescriptions](https://github.com/zircote/swagger-php/tree/master/src/Processors/DocBlockDescriptions.php) Checks if the annotation has a summary and/or description property @@ -58,11 +58,12 @@ Use the property context to extract useful information and inject that into the Build the openapi->paths using the detected `@OA\PathItem` and `@OA\Operation` (`@OA\Get`, `@OA\Post`, etc). ### [AugmentParameters](https://github.com/zircote/swagger-php/tree/master/src/Processors/AugmentParameters.php) - -### Config settings +Augments shared and operations parameters from docblock comments. +#### Config settings
No details available.
If set to true
try to find operation parameter descriptions in the operation docblock.
No details available.
If set to true
generate ids (md5) instead of clear text operation ids.
tags
list.
### [CleanUnmerged](https://github.com/zircote/swagger-php/tree/master/src/Processors/CleanUnmerged.php)
+### [PathFilter](https://github.com/zircote/swagger-php/tree/master/src/Processors/PathFilter.php)
+
+Allows to filter endpoints based on tags and/or path.
+
+If no `tags` or `paths` filters are set, no filtering is performed.
+All filter (regular) expressions must be enclosed within delimiter characters as they are used as-is.
+#### Config settings
+A list of regular expressions to match tags
to include.
A list of regular expressions to match paths
to include.
Components
and removed unused schemas.
+#### Config settings
+Enables/disables the CleanUnusedComponents
processor.
CleanUnusedComponents
processor.
+ */
public function setEnabled(bool $enabled): CleanUnusedComponents
{
$this->enabled = $enabled;
diff --git a/src/Processors/OperationId.php b/src/Processors/OperationId.php
index 0e799b07..b6aff2ca 100644
--- a/src/Processors/OperationId.php
+++ b/src/Processors/OperationId.php
@@ -15,7 +15,7 @@
*/
class OperationId implements ProcessorInterface
{
- protected $hash;
+ protected $hash = true;
public function __construct(bool $hash = true)
{
diff --git a/src/Processors/PathFilter.php b/src/Processors/PathFilter.php
index 13c3fd5e..b393d468 100644
--- a/src/Processors/PathFilter.php
+++ b/src/Processors/PathFilter.php
@@ -20,10 +20,8 @@ class PathFilter implements ProcessorInterface
{
use AnnotationTrait;
- /** @var array */
protected $tags = [];
- /** @var array */
protected $paths = [];
public function __construct(array $tags = [], array $paths = [])
diff --git a/tools/procgen.php b/tools/procgen.php
index bfbcd203..f6018dda 100644
--- a/tools/procgen.php
+++ b/tools/procgen.php
@@ -9,6 +9,7 @@
ob_start();
echo $procgen->preamble('Processors');
+echo PHP_EOL . '## Default Processors' . PHP_EOL;
foreach ($procgen->getProcessorsDetails() as $ii => $details) {
$off = $ii + 1;
@@ -17,12 +18,15 @@
if ($details['options']) {
$configPrefix = lcfirst($details['name']) . '.';
- echo '### Config settings' . PHP_EOL;
+ echo '#### Config settings' . PHP_EOL;
foreach ($details['options'] as $name => $odetails) {
if ($odetails) {
$var = ' : ' . $odetails['type'] . '';
+ $default = ' : ' . $odetails['default'] . '';
+
echo '' . nl2br($odetails['phpdoc'] ? $odetails['phpdoc']['content'] : ProcGenerator::NO_DETAILS_AVAILABLE) . '
'; echo '