mirror of
https://github.com/symfony/recipes.git
synced 2026-03-23 23:32:10 +01:00
[api-platform/core] Support for v3.4 and v4 (#1339)
* [api-platform/core] Support for v4 * fix * fix graphql * fix graphql
This commit is contained in:
7
api-platform/core/4.0/config/packages/api_platform.yaml
Normal file
7
api-platform/core/4.0/config/packages/api_platform.yaml
Normal file
@@ -0,0 +1,7 @@
|
||||
api_platform:
|
||||
title: Hello API Platform
|
||||
version: 1.0.0
|
||||
defaults:
|
||||
stateless: true
|
||||
cache_headers:
|
||||
vary: ['Content-Type', 'Authorization', 'Origin']
|
||||
4
api-platform/core/4.0/config/routes/api_platform.yaml
Normal file
4
api-platform/core/4.0/config/routes/api_platform.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
api_platform:
|
||||
resource: .
|
||||
type: api_platform
|
||||
prefix: /api
|
||||
9
api-platform/core/4.0/manifest.json
Normal file
9
api-platform/core/4.0/manifest.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
10
api-platform/core/4.0/post-install.txt
Normal file
10
api-platform/core/4.0/post-install.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
* Your API is almost ready:
|
||||
1. Create your first API resource in <info>src/ApiResource</info>;
|
||||
2. Go to <info>/api</info> to browse your API
|
||||
|
||||
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
|
||||
|
||||
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
|
||||
then browse <info>/api/graphql</info>.
|
||||
|
||||
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
|
||||
0
api-platform/core/4.0/src/ApiResource/.gitignore
vendored
Normal file
0
api-platform/core/4.0/src/ApiResource/.gitignore
vendored
Normal file
18
api-platform/symfony/3.3/config/packages/api_platform.yaml
Normal file
18
api-platform/symfony/3.3/config/packages/api_platform.yaml
Normal file
@@ -0,0 +1,18 @@
|
||||
api_platform:
|
||||
title: Hello API Platform
|
||||
version: 1.0.0
|
||||
formats:
|
||||
jsonld: ['application/ld+json']
|
||||
docs_formats:
|
||||
jsonld: ['application/ld+json']
|
||||
jsonopenapi: ['application/vnd.openapi+json']
|
||||
html: ['text/html']
|
||||
defaults:
|
||||
stateless: true
|
||||
cache_headers:
|
||||
vary: ['Content-Type', 'Authorization', 'Origin']
|
||||
extra_properties:
|
||||
standard_put: true
|
||||
rfc_7807_compliant_errors: true
|
||||
keep_legacy_inflector: false
|
||||
use_symfony_listeners: true
|
||||
4
api-platform/symfony/3.3/config/routes/api_platform.yaml
Normal file
4
api-platform/symfony/3.3/config/routes/api_platform.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
api_platform:
|
||||
resource: .
|
||||
type: api_platform
|
||||
prefix: /api
|
||||
9
api-platform/symfony/3.3/manifest.json
Normal file
9
api-platform/symfony/3.3/manifest.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
10
api-platform/symfony/3.3/post-install.txt
Normal file
10
api-platform/symfony/3.3/post-install.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
* Your API is almost ready:
|
||||
1. Create your first API resource in <info>src/ApiResource</info>;
|
||||
2. Go to <info>/api</info> to browse your API
|
||||
|
||||
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
|
||||
|
||||
* To enable the GraphQL support, run <comment>composer require webonyx/graphql-php</>,
|
||||
then browse <info>/api/graphql</info>.
|
||||
|
||||
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
|
||||
0
api-platform/symfony/3.3/src/ApiResource/.gitignore
vendored
Normal file
0
api-platform/symfony/3.3/src/ApiResource/.gitignore
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
api_platform:
|
||||
title: Hello API Platform
|
||||
version: 1.0.0
|
||||
defaults:
|
||||
stateless: true
|
||||
cache_headers:
|
||||
vary: ['Content-Type', 'Authorization', 'Origin']
|
||||
4
api-platform/symfony/4.0/config/routes/api_platform.yaml
Normal file
4
api-platform/symfony/4.0/config/routes/api_platform.yaml
Normal file
@@ -0,0 +1,4 @@
|
||||
api_platform:
|
||||
resource: .
|
||||
type: api_platform
|
||||
prefix: /api
|
||||
9
api-platform/symfony/4.0/manifest.json
Normal file
9
api-platform/symfony/4.0/manifest.json
Normal file
@@ -0,0 +1,9 @@
|
||||
{
|
||||
"bundles": {
|
||||
"ApiPlatform\\Symfony\\Bundle\\ApiPlatformBundle": ["all"]
|
||||
},
|
||||
"copy-from-recipe": {
|
||||
"config/": "%CONFIG_DIR%/",
|
||||
"src/": "%SRC_DIR%/"
|
||||
}
|
||||
}
|
||||
10
api-platform/symfony/4.0/post-install.txt
Normal file
10
api-platform/symfony/4.0/post-install.txt
Normal file
@@ -0,0 +1,10 @@
|
||||
* Your API is almost ready:
|
||||
1. Create your first API resource in <info>src/ApiResource</info>;
|
||||
2. Go to <info>/api</info> to browse your API
|
||||
|
||||
* Using MakerBundle? Try <info>php bin/console make:entity --api-resource</info>
|
||||
|
||||
* To enable the GraphQL support, run <comment>composer require api-platform/graphql</>,
|
||||
then browse <info>/api/graphql</info>.
|
||||
|
||||
* <fg=blue>Read</> the documentation at <comment>https://api-platform.com/docs/</>
|
||||
0
api-platform/symfony/4.0/src/ApiResource/.gitignore
vendored
Normal file
0
api-platform/symfony/4.0/src/ApiResource/.gitignore
vendored
Normal file
Reference in New Issue
Block a user