Ubah dari Swagger ke Dedoc lalu buat API Ticket dan TicketType

This commit is contained in:
Wian Drs
2026-06-20 00:12:19 +07:00
parent 2f805a233d
commit 2dc461ae89
1283 changed files with 36405 additions and 89470 deletions
File diff suppressed because one or more lines are too long
+46
View File
@@ -0,0 +1,46 @@
<?php
use Dedoc\Scramble\Infer\Scope\Index;
use Dedoc\Scramble\Infer\Services\FileParser;
use PhpParser\ParserFactory;
include 'vendor/autoload.php';
$classes = [
Exception::class,
RuntimeException::class,
\Symfony\Component\HttpKernel\Exception\HttpException::class,
];
app()->singleton(FileParser::class, function () {
return new FileParser(
(new ParserFactory)->createForHostVersion()
);
});
app()->singleton(Index::class);
$classesDefinitions = [];
foreach ($classes as $className) {
$classesDefinitions[$className] = generateClassDefinitionInitialization($className);
}
function generateClassDefinitionInitialization(string $name)
{
$classAnalyzer = app(\Dedoc\Scramble\Infer\Analyzer\ClassAnalyzer::class);
$classDefinition = $classAnalyzer->analyze($name);
foreach ($classDefinition->methods as $methodName => $method) {
$classDefinition->getMethodDefinition($methodName);
}
return serialize($classAnalyzer->analyze($name));
}
$def = var_export($classesDefinitions, true);
file_put_contents(__DIR__.'/../classMap.php', <<<EOL
<?php
/*
* Do not change! This file is generated via scripts/generate.php.
*/
return {$def};
EOL);