Define servers

#[
    Server('same server1', 'https//example.com'),
    Server('same server2', 'https//example.org'),
]
class BaseController 
{
    //
}
1
2
3
4
5
6
7
8

Define info

Only title is required. Others props are optional.

#[
    Info(
        'title',
        '1.0.0',
        'description',
        'https://example.com/termsOfService',
        [
            'name' => 'API Support',
            'url' => 'https://example.com/support',
            'email' => 'support@output.json.com'
        ],
        [
            'name' => 'Apache 2.0',
            'url' => 'https://www.apache.org/licenses/LICENSE-2.0.html'
        ],
    ),
]
class BaseController 
{
    //
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21

Define security schema

#[
    SecurityScheme(
        'bearerAuth',
        'http',
        'bearerAuth',
        'header',
        'bearer',
        'JWT',
    ),
]
class BaseController 
{
    //
}
1
2
3
4
5
6
7
8
9
10
11
12
13
14
Last Updated: 9/14/2021, 7:44:34 AM
Contributors: AkioSarkiz