-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathswagger.php
More file actions
31 lines (29 loc) · 879 Bytes
/
swagger.php
File metadata and controls
31 lines (29 loc) · 879 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
require_once __DIR__ . '/vendor/autoload.php';
use OpenApi\Generator;
/**
* @OA\Get(
* path="/php-api/help/api.php",
* summary="JSON for rendering swagger document without authorization",
* description="Returns JSON for swagger documentation",
* operationId="getSwaggerDocument",
* security={},
* deprecated=true,
* @OA\Response(
* response=200,
* description="Successful response"
* ),
* @OA\Response(
* response=404,
* description="Not found",
* @OA\JsonContent(ref="#/components/schemas/DataNotFound")
* ),
* @OA\Response(
* response=500,
* description="Server error",
* @OA\JsonContent(ref="#/components/schemas/ErrorMessage")
* )
* )
*/
header('Content-Type: application/json');
echo Generator::scan([__DIR__ . '/app'])->toJson();