Passed
Branch master (bbfb46)
by Jan
22:41 queued 14:44
created

YourFirstApiController   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 8
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 2
dl 0
loc 8
rs 10
c 0
b 0
f 0
wmc 1
1
<?php declare(strict_types=1);
2
3
namespace SwagExample\Controller;
4
5
use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
6
use Symfony\Component\HttpFoundation\JsonResponse;
7
use Symfony\Component\Routing\Annotation\Route;
8
9
class YourFirstApiController extends AbstractController
10
{
11
    /**
12
     * @Route("/api/v{version}/_action/swag/my-api-action", name="api.action.swag.my-api-action", methods={"POST"})
13
     */
14
    public function yourFirstApiAction(): JsonResponse
15
    {
16
        return new JsonResponse(['You successfully created your first API route']);
17
    }
18
}
19