Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
<?php namespace OpenApi\Examples\ExampleObject; use OpenApi\Annotations as OA; /** * @..
Decoded Output download
<?php
namespace OpenApi\Examples\ExampleObject;
use OpenApi\Annotations as OA;
/**
* @OA\Tag(
* name="user",
* description="User related operations"
* )
* @OA\Info(
* version="1.0",
* title="Example for response examples value",
* description="Example info",
* @OA\Contact(name="Swagger API Team")
* )
* @OA\Server(
* url="https://example.localhost",
* description="API server"
* )
*/
class OpenApiSpec
{
}
/**
* @OA\Put(
* path="/users/{id}",
* summary="Updates a user",
* description="Updates a user",
* operationId="updateUser",
* tags={"user"},
* @OA\Parameter(
* description="Parameter with mutliple examples",
* in="path",
* name="id",
* required=true,
* @OA\Schema(type="string"),
* @OA\Examples(example="int", value="1", summary="An int value."),
* @OA\Examples(example="uuid", value="0006faf6-7a61-426c-9034-579f2cfcfa83", summary="An UUID value."),
* ),
* @OA\Response(
* response=200,
* description="OK"
* )
* )
*/
class UserUpdateEndpoint
{
}
/**
* @OA\Post(
* path="/users",
* summary="Adds a new user - with oneOf examples",
* description="Adds a new user",
* operationId="addUser",
* tags={"user"},
* @OA\RequestBody(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="id",
* type="string"
* ),
* @OA\Property(
* property="name",
* type="string"
* ),
* @OA\Property(
* property="phone",
* oneOf={
* @OA\Schema(type="string"),
* @OA\Schema(type="integer"),
* }
* ),
* example={"id": "a3fb6", "name": "Jessica Smith", "phone": 12345678}
* )
* )
* ),
* @OA\Response(
* response=200,
* description="OK",
* @OA\JsonContent(
* oneOf={
* @OA\Schema(ref="#/components/schemas/Result"),
* @OA\Schema(type="boolean")
* },
* @OA\Examples(example="result", value={"success": true}, summary="An result object."),
* @OA\Examples(example="bool", value=false, summary="A boolean value."),
* )
* )
* )
*/
class UserAddEndpoint
{
}
/**
* @OA\Schema(
* schema="Result",
* title="Sample schema for using references",
* @OA\Property(
* property="status",
* type="string"
* ),
* @OA\Property(
* property="error",
* type="string"
* )
* )
*/
class ResultSchema
{
}
?>
Did this file decode correctly?
Original Code
<?php
namespace OpenApi\Examples\ExampleObject;
use OpenApi\Annotations as OA;
/**
* @OA\Tag(
* name="user",
* description="User related operations"
* )
* @OA\Info(
* version="1.0",
* title="Example for response examples value",
* description="Example info",
* @OA\Contact(name="Swagger API Team")
* )
* @OA\Server(
* url="https://example.localhost",
* description="API server"
* )
*/
class OpenApiSpec
{
}
/**
* @OA\Put(
* path="/users/{id}",
* summary="Updates a user",
* description="Updates a user",
* operationId="updateUser",
* tags={"user"},
* @OA\Parameter(
* description="Parameter with mutliple examples",
* in="path",
* name="id",
* required=true,
* @OA\Schema(type="string"),
* @OA\Examples(example="int", value="1", summary="An int value."),
* @OA\Examples(example="uuid", value="0006faf6-7a61-426c-9034-579f2cfcfa83", summary="An UUID value."),
* ),
* @OA\Response(
* response=200,
* description="OK"
* )
* )
*/
class UserUpdateEndpoint
{
}
/**
* @OA\Post(
* path="/users",
* summary="Adds a new user - with oneOf examples",
* description="Adds a new user",
* operationId="addUser",
* tags={"user"},
* @OA\RequestBody(
* @OA\MediaType(
* mediaType="application/json",
* @OA\Schema(
* @OA\Property(
* property="id",
* type="string"
* ),
* @OA\Property(
* property="name",
* type="string"
* ),
* @OA\Property(
* property="phone",
* oneOf={
* @OA\Schema(type="string"),
* @OA\Schema(type="integer"),
* }
* ),
* example={"id": "a3fb6", "name": "Jessica Smith", "phone": 12345678}
* )
* )
* ),
* @OA\Response(
* response=200,
* description="OK",
* @OA\JsonContent(
* oneOf={
* @OA\Schema(ref="#/components/schemas/Result"),
* @OA\Schema(type="boolean")
* },
* @OA\Examples(example="result", value={"success": true}, summary="An result object."),
* @OA\Examples(example="bool", value=false, summary="A boolean value."),
* )
* )
* )
*/
class UserAddEndpoint
{
}
/**
* @OA\Schema(
* schema="Result",
* title="Sample schema for using references",
* @OA\Property(
* property="status",
* type="string"
* ),
* @OA\Property(
* property="error",
* type="string"
* )
* )
*/
class ResultSchema
{
}
Function Calls
None |
Stats
MD5 | aa03b5d7fab7ab6aa8e1f94451226045 |
Eval Count | 0 |
Decode Time | 130 ms |