Skip to content

Commit d17f9fa

Browse files
authored
api-platform 3.3 configuration (#1312)
1 parent c511f8c commit d17f9fa

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
api_platform:
2+
title: Hello API Platform
3+
version: 1.0.0
4+
formats:
5+
jsonld: ['application/ld+json']
6+
docs_formats:
7+
jsonld: ['application/ld+json']
8+
jsonopenapi: ['application/vnd.openapi+json']
9+
html: ['text/html']
10+
defaults:
11+
stateless: true
12+
cache_headers:
13+
vary: ['Content-Type', 'Authorization', 'Origin']
14+
extra_properties:
15+
standard_put: true
16+
rfc_7807_compliant_errors: true
17+
keep_legacy_inflector: false
18+
use_symfony_listeners: true
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

api-platform/core/3.3/manifest.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
{
2+
"bundles": {
3+
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
4+
},
5+
"copy-from-recipe": {
6+
"config/": "%CONFIG_DIR%/",
7+
"src/": "%SRC_DIR%/"
8+
}
9+
}
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
* Your API is almost ready:
2+
1. Create your first API resource in <info>src/ApiResource</info>;
3+
2. Go to <info>/api</info> to browse your API
4+
5+
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
6+
7+
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
8+
then browse <info>/api/graphql</info>.
9+
10+
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>

api-platform/core/3.3/src/ApiResource/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)