Skip to content

Commit a5c8679

Browse files
authored
[api-platform/core] sane defaults for API Platform 3.2 (#1240)
1 parent df1203b commit a5c8679

File tree

5 files changed

+41
-0
lines changed

5 files changed

+41
-0
lines changed
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+
doc_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+
event_listeners_backward_compatibility_layer: false
18+
keep_legacy_inflector: false
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.2/manifest.json

+9
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+
}
+10
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.2/src/ApiResource/.gitignore

Whitespace-only changes.

0 commit comments

Comments
 (0)