Skip to content

Commit 3d29213

Browse files
authored
add API Platform (#7)
1 parent e903ad8 commit 3d29213

File tree

5 files changed

+33
-0
lines changed

5 files changed

+33
-0
lines changed

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@
55
"php": ">=7.1.3",
66
"ext-ctype": "*",
77
"ext-iconv": "*",
8+
"api-platform/core": "^2.6",
89
"composer/package-versions-deprecated": "1.11.99.1",
910
"doctrine/annotations": "^1.0",
1011
"doctrine/doctrine-bundle": "^2.3",

config/bundles.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,5 @@
1313
Twig\Extra\TwigExtraBundle\TwigExtraBundle::class => ['all' => true],
1414
Symfony\Bundle\MercureBundle\MercureBundle::class => ['all' => true],
1515
Symfony\WebpackEncoreBundle\WebpackEncoreBundle::class => ['all' => true],
16+
ApiPlatform\Core\Bridge\Symfony\Bundle\ApiPlatformBundle::class => ['all' => true],
1617
];

config/packages/api_platform.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
api_platform:
2+
mapping:
3+
paths: ['%kernel.project_dir%/src/Entity']
4+
patch_formats:
5+
json: ['application/merge-patch+json']
6+
swagger:
7+
versions: [3]

config/routes/api_platform.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
api_platform:
2+
resource: .
3+
type: api_platform
4+
prefix: /api

symfony.lock

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,18 @@
11
{
2+
"api-platform/core": {
3+
"version": "2.6",
4+
"recipe": {
5+
"repo": "github.com/symfony/recipes",
6+
"branch": "master",
7+
"version": "2.5",
8+
"ref": "05b57782a78c21a664a42055dc11cf1954ca36bb"
9+
},
10+
"files": [
11+
"config/routes/api_platform.yaml",
12+
"config/packages/api_platform.yaml",
13+
"src/Entity/.gitignore"
14+
]
15+
},
216
"composer/package-versions-deprecated": {
317
"version": "1.11.99.1"
418
},
@@ -69,6 +83,9 @@
6983
"egulias/email-validator": {
7084
"version": "3.1.1"
7185
},
86+
"fig/link-util": {
87+
"version": "1.2.0"
88+
},
7289
"friendsofphp/proxy-manager-lts": {
7390
"version": "v1.0.3"
7491
},
@@ -597,5 +614,8 @@
597614
},
598615
"webmozart/assert": {
599616
"version": "1.10.0"
617+
},
618+
"willdurand/negotiation": {
619+
"version": "3.0.0"
600620
}
601621
}

0 commit comments

Comments
 (0)