OXIESEC PANEL
- Current Dir:
/
/
var
/
www
/
reader
/
API
/
vendor
/
zircote
/
swagger-php
/
Examples
/
processors
/
schema-query-parameter
Server IP: 139.59.38.164
Upload:
Create Dir:
Name
Size
Modified
Perms
📁
..
-
08/07/2024 04:34:50 AM
rwxr-xr-x
📄
SchemaQueryParameter.php
2.4 KB
08/07/2024 04:34:49 AM
rw-r--r--
📁
app
-
08/07/2024 04:35:07 AM
rwxr-xr-x
📄
scan.php
884 bytes
08/07/2024 04:34:49 AM
rw-r--r--
📄
schema-query-parameter.yaml
1.48 KB
08/07/2024 04:34:49 AM
rw-r--r--
Editing: scan.php
Close
<?php use OpenApi\Generator; use OpenApi\Pipeline; use OpenApi\Processors\BuildPaths; use SchemaQueryParameterProcessor\SchemaQueryParameter; $classLoader = require __DIR__ . '/../../../vendor/autoload.php'; // register our app namespace... $classLoader->addPsr4('App\\', __DIR__ . '/app'); // and our custom processor $classLoader->addPsr4('SchemaQueryParameterProcessor\\', __DIR__); $insertMatch = function (array $pipes) { foreach ($pipes as $ii => $pipe) { if ($pipe instanceof BuildPaths) { return $ii; } } return null; }; $openapi = (new Generator()) ->withProcessor(function (Pipeline $pipeline) use ($insertMatch) { $pipeline->insert(new SchemaQueryParameter(), $insertMatch); }) ->generate([__DIR__ . '/app']); // file_put_contents(__DIR__ . '/schema-query-parameter.yaml', $openapi->toYaml()); echo $openapi->toYaml();