ヤミ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
/
src
/
Swagger
/
Viewing: SwaggerDecoratorExternalService.php
<?php /** * Created by PhpStorm. * User: macbookpro * Date: 21/03/2021 * Time: 16:40 */ namespace App\Swagger; use Symfony\Component\HttpFoundation\Response; use Symfony\Component\Serializer\Normalizer\NormalizerInterface; final class SwaggerDecoratorExternalService 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']['smsResponse'] = [ 'type' => 'object', 'properties' => [ 'phoneNumber' => [ 'type' => 'string', 'readOnly' => true, ], 'message' => [ 'type' => 'string', 'readOnly' => true, ], 'status' => [ 'type' => 'string', 'readOnly' => true, ], ], ]; //redirect-uri,grant-type smsParam $docs['components']['schemas']['smsParam'] = [ 'type' => 'object', 'properties' => [ 'phoneNumber' => [ 'type' => 'string', 'example' => '23769000000', ], 'message' => [ 'type' => 'string', 'example' => 'Hello', ] ], ]; $docs['components']['schemas']['sendmail'] = [ 'type' => 'object', 'properties' => [ 'email' => [ 'type' => 'string', 'example' => 'ngouaharonaldnmr@gmail.com', ], 'subject' => [ 'type' => 'string', 'example' => 'New Registration', ], 'receiver' => [ 'type' => 'string', 'example' => 'John Doe', ], 'title' => [ 'type' => 'string', 'example' => 'New Registration', ], 'attachs' => [ 'type' => 'array', 'example' => ['doc.pdf', 'doc2.png'], ], 'body' => [ 'type' => 'string', 'example' => 'Hello, your registration has been successfully completed', ], ], ]; $tokenDocumentation = [ 'paths' => [ '/external-service/sms' => [ 'post' => [ 'tags' => ['ExternalService'], 'operationId' => 'postSMSAction', 'summary' => 'Send SMS.', 'requestBody' => [ 'description' => 'Send SMS', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/smsParam', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'SMS send response', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/smsResponse', ], ], ], ], ], ], ], '/external-service/sendmail' => [ 'post' => [ 'tags' => ['ExternalService'], 'operationId' => 'sendEmailAction', 'summary' => 'send mail to User.', 'requestBody' => [ 'description' => 'send mail to User', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/sendmail', ], ], ], ], 'responses' => [ Response::HTTP_OK => [ 'description' => 'Mail Send Successfully', 'content' => [ 'application/json' => [ 'schema' => [ '$ref' => '#/components/schemas/sendmail', ], ], ], ], ], ], ], ], ]; return array_merge_recursive($docs, $tokenDocumentation); } }
Coded With 💗 by
0x6ick