Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 6f20cf5

Browse files
authored
New getting started guide (#109)
1 parent aab6725 commit 6f20cf5

File tree

19 files changed

+818
-895
lines changed

19 files changed

+818
-895
lines changed

‎core/events.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ final class BookMailSubscriber implements EventSubscriberInterface
7979
}
8080
```
8181

82-
If you use the standard edition of API Platform, creating the previous class is enough. [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle)
82+
If you use the official API Platform distribution, creating the previous class is enough. [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle)
8383
(installed by default) will automatically register this subscriber as a service and will inject its dependencies using [the
8484
autowiring feature of the Symfony Dependency Injection Container](http://symfony.com/doc/current/components/dependency_injection/autowiring.html).
8585

‎core/getting-started.md‎

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Installing API Platform Core
44

5-
If you are starting a new project, the easiest way to get API Platform up is to install the [API Platform Standard Edition](https://github.com/api-platform/api-platform).
5+
If you are starting a new project, the easiest way to get API Platform up is to install the [API Platform Standard Edition](../distribution/api.md).
66
It ships with the API Platform Core library integrated with [the Symfony framework](https://symfony.com), [the schema generator](../schema-generator/),
77
[Doctrine ORM](www.doctrine-project.org), [NelmioApiDocBundle](https://github.com/nelmio/NelmioApiDocBundle), [NelmioCorsBundle](https://github.com/nelmio/NelmioCorsBundle)
88
and [Behat](http://behat.org).
@@ -38,24 +38,23 @@ api:
3838
prefix: '/api' # Optional
3939
```
4040
41-
There is no mandatory configuration. However, a lot of [configuration parameters](configuration.md) are available.
41+
There is no mandatory configuration options although [many settings are available](configuration.md).
4242
4343
## Before Reading this Documentation
4444
45-
If you haven't read it already, take a look at [the "Creating your first API with API Platform, in 5 minutes" guide](../tutorial/api.md).
46-
Using the schema generator is not necessary to use API Platform Core. But the "Exposing the API" section of this tutorial
47-
covers basic concepts required to understand how API Platform works including how it implements the REST pattern and what
48-
[JSON-LD](http://json-ld.org/) and [Hydra](http://www.hydra-cg.com/) formats are.
45+
If you haven't read it already, take a look at [the "Creating your first API with API Platform, in a few minutes" guide](../distribution/getting-started.md).
46+
This tutorial covers basic concepts required to understand how API Platform works including how it implements the REST pattern
47+
and what [JSON-LD](http://json-ld.org/) and [Hydra](http://www.hydra-cg.com/) formats are.
4948
5049
## Mapping the Entities
5150
52-
API Platform Core is able to automatically expose entities mapped as "API resources" through a REST API supporting CRUD operations.
51+
API Platform Core is able to automatically expose entities mapped as "API resources" through a REST API supporting CRUD
52+
operations.
5353
To expose your entities, you can use Docblock annotations, XML and YAML configuration files.
5454
5555
Here is an example of entities mapped using annotations which will be exposed trough a REST API:
5656
5757
```php
58-
<?php
5958

6059
// src/AppBundle/Entity/Product.php
6160

@@ -166,7 +165,7 @@ As an alternative to annotations, you can map entity classes using XML or YAML:
166165
<configurations>
167166

168167
```xml
169-
# src/AppBundle/Resources/config/resources.xml
168+
# src/AppBundle/Resources/config/api_resources.xml
170169
<?xml version="1.0" encoding="UTF-8" ?>
171170
<resources>
172171
<resource class="AppBundle\Entity\Product" />
@@ -180,7 +179,7 @@ As an alternative to annotations, you can map entity classes using XML or YAML:
180179
```
181180

182181
```yaml
183-
# src/AppBundle/Resources/config/resources.yml
182+
# src/AppBundle/Resources/config/api_resources.yml
184183

185184
resources:
186185
product:

‎core/index.md‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# API Platform Core
1+
# The API Platform Core Library
22

33
API Platform Core is an easy to use and powerful library to create [hypermedia-driven REST APIs](http://en.wikipedia.org/wiki/HATEOAS).
44
It is a component of the [API Platform framework](https://api-platform.com). It can be used standalone or with [the Symfony
@@ -10,11 +10,13 @@ standards.
1010
Build a working and fully-featured CRUD API in minutes. Leverage the awesome features of the tool to develop complex and
1111
high performance API-first projects.
1212

13+
If you are starting a new project, the easiest way to get API Platform up is to install the [API Platform Standard Edition](../distribution/api.md).
14+
1315
[![JSON-LD enabled](http://json-ld.org/images/json-ld-logo-64.png)](http://json-ld.org)
1416

1517
## Features
1618

17-
Here is the fully-featured REST API you'll get in minutes, I promise:
19+
Here is the fully-featured REST API you'll get in minutes:
1820

1921
* CRUD support through the API for Doctrine entities: list, `GET`, `POST`, `PUT` and `DELETE`
2022
* Hypermedia implementing [JSON-LD](http://json-ld.org)
@@ -48,5 +50,5 @@ contains a working app covering all features of the library.
4850
* (french) [API-first et Linked Data avec Symfony (sfPot Lille 2015)](https://les-tilleuls.coop/slides/dunglas/slides-sfPot-2015年01月15日/#/)
4951
* (french) [Behat PHP code coverage](http://www.kitpages.fr/fr/cms/204/behat-php-code-coverage)
5052

51-
Previous chapter: [Tutorial: An AngularJS Client](../tutorial/angularjs.md)
53+
Previous chapter: [API Platform Philosophy](../distribution/philosophy.md)
5254
Next chapter: [Getting Started](getting-started.md)

‎core/nelmio-api-doc.md‎

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
# NelmioApiDocBundle Integration
22

3-
![Screenshot of ApiBundle integrated with NelmioApiDocBundle](../tutorial/images/api-doc.png)
3+
![Screenshot of API Platform integrated with NelmioApiDocBundle](images/NelmioApiDocBundle.png)
44

55
[NelmioApiDocBundle](https://github.com/nelmio/NelmioApiDocBundle) (since version 2.9) has built-in support for API Platform.
6-
Installing it will give you access to a human-readable documentation and a nice sandbox. It is an alternative to the builtin API Platform documentation.
6+
Installing it will give you access to a human-readable documentation and a nice sandbox. It is an alternative to the builtin
7+
API Platform documentation.
78

8-
If you use the standalone API Platform Core bundle, download and enable the bundle as explained in [NelmioApiDocBundle installation steps](https://github.com/nelmio/NelmioApiDocBundle/blob/master/Resources/doc/index.rst) (skip routing and configuration steps), and then copy the following configuration:
9+
To enable the NelmioApiDoc integration, copy the following configuration:
910

1011
```yaml
1112
# app/config/config.yml
@@ -18,7 +19,7 @@ nelmio_api_doc:
1819
sandbox:
1920
accept_type: 'application/json'
2021
body_format:
21-
formats: ['json']
22+
formats: ['json']
2223
default_format: 'json'
2324
request_format:
2425
formats:

‎core/operations.md‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ implements the [Action-Domain-Responder](https://github.com/pmjones/adr) pattern
170170

171171
Note: [the event system](events.md) should be preferred over custom controllers when applicable.
172172

173-
The standard edition of API Platform also comes with an enhanced action system for Symfony pre-installed: [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle).
173+
The distribution of API Platform also comes with an enhanced action system for Symfony pre-installed: [DunglasActionBundle](https://github.com/dunglas/DunglasActionBundle).
174174
*DunglasActionBundle* eases the implementation of the ADR pattern with Symfony and improves the developer experience.
175175

176176
It automatically registers action classes stored in `src/*Bundle/Action` and `src/*Bundle/Controller` directories as autowired
@@ -280,7 +280,7 @@ It is mandatory to set the `_api_resource_class` and `_api_item_operation_name`
280280
operation) in the parameters of the route (`defaults` key). It allows API Platform and the Symfony routing system to hook
281281
together.
282282

283-
Here we consider that DunglasActionBundle is installed (the default when using the API Platform standard edition). This
283+
Here we consider that DunglasActionBundle is installed (the default when using the API Platform distribution). This
284284
action will be automatically registered as a service (the service name is the same as the class name: `AppBundle\Action\BookSpecial`).
285285

286286
API Platform automatically retrieve the appropriate PHP entity then then deserializes it, and for `POST` and `PUT` requests

‎core/performance.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44

55
Computing metadata used by the bundle is a costly operation. Fortunately, metadata can be computed once and then cached.
66
API Platform internally uses a [PSR-6](http://www.php-fig.org/psr/psr-6/) cache. If the Symfony Cache Component is available
7-
(the default in the standard edition), it automatically enables the support for the best cache adapter available.
7+
(the default in the official distribution), it automatically enables the support for the best cache adapter available.
88

99
Best performance is achieved using [APCu](https://github.com/krakjoe/apcu). Be sure to have the APCu extension installed
1010
on your production server, API Platform will automatically use it.

‎core/serialization-groups-and-relations.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ feature of the Symfony Serializer component.
99
The Symfony Serializer component allows to specify the definition of serialization using XML, YAML, or annotations. As annotations
1010
are really easy to understand, we will use them in this documentation.
1111

12-
However, if you don't use the standard edition of API Platform, don't forget to enable annotation support in the serializer
12+
However, if you don't use the official distribution of API Platform, don't forget to enable annotation support in the serializer
1313
configuration:
1414

1515
```yaml

‎deployment/docker.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
API Platform projects can be run through [Docker](https://www.docker.com/).
44
A [Docker compose](https://docs.docker.com/compose/) configuration including a fully working [LAMP](https://en.wikipedia.org/wiki/LAMP_(software_bundle))
5-
stack is shipped with the standard edition.
5+
stack is shipped with the API Platform distribution.
66

77
To install it, run the following commands (Docker must be installed on your system):
88

‎distribution/images/swagger-ui-1.png‎

238 KB
Loading[フレーム]

‎distribution/images/swagger-ui-2.png‎

323 KB
Loading[フレーム]

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /