Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
<h1 align="center"><a href="https://api-platform.com"><img src="https://api-platform.com/logo-250x250.png" alt="API Platform"></a></h1>
API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility
and flexibility:
* Design your own data model as plain old PHP classes or [**import an existing one**](https://api-platform.com/docs/schema-generator)
from the [Schema.org](https://schema.org/) vocabulary.
* **Expose in minutes a hypermedia REST or a GraphQL API** with pagination, data validation, access control, relation embedding,
filters and error handling...
* Benefit from Content Negotiation: [GraphQL](https://graphql.org), [JSON-LD](https://json-ld.org), [Hydra](https://hydra-cg.com),
[HAL](https://github.com/mikekelly/hal_specification/blob/master/hal_specification.md), [JSONAPI](https://jsonapi.org/), [YAML](https://yaml.org/), [JSON](https://www.json.org/), [XML](https://www.w3.org/XML/) and [CSV](https://www.ietf.org/rfc/rfc4180.txt) are supported out of the box.
* Enjoy the **beautiful automatically generated API documentation** ([Swagger](https://swagger.io/)/[OpenAPI](https://www.openapis.org/)).
* Add [**a convenient Material Design administration interface**](https://api-platform.com/docs/admin) built with [React](https://reactjs.org/)
without writing a line of code.
* **Scaffold fully functional Progressive-Web-Apps and mobile apps** built with [React](https://api-platform.com/docs/client-generator/react),
[Vue.js](https://api-platform.com/docs/client-generator/vuejs) or [React Native](https://api-platform.com/docs/client-generator/react-native)
thanks to [the client generator](https://api-platform.com/docs/client-generator) (a Vue.js generator is also available).
* Install a development environment and deploy your project in production using **[Docker](https://api-platform.com/docs/distribution)**
and [Kubernetes](https://api-platform.com/docs/deployment/kubernetes).
* Easily add **[JSON Web Token](https://api-platform.com/docs/core/jwt) or [OAuth](https://oauth.net/) authentication**.
* Create specs and tests with a **developer friendly API testing tool** on top of [Behat](https://behat.org/).
[](https://github.com/api-platform/core/actions?workflow=CI)
[](https://travis-ci.org/api-platform/core)
[](https://circleci.com/gh/api-platform/core/tree/master)
[](https://ci.appveyor.com/project/dunglas/dunglasapibundle/branch/master)
[](https://codecov.io/gh/api-platform/core/branch/master)
[](https://insight.symfony.com/projects/92d78899-946c-4282-89a3-ac92344f9a93)
[](https://scrutinizer-ci.com/g/api-platform/core/?branch=master)
The official project documentation is available **[on the API Platform website](https://api-platform.com)**.
API Platform embraces open web standards (OpenAPI, JSON-LD, GraphQL, Hydra, HAL, JSONAPI, JWT, OAuth, HTTP...) and the
[Linked Data](https://www.w3.org/standards/semanticweb/data) movement. Your API will automatically expose structured data
in Schema.org / JSON-LD. It means that your API Platform application is usable **out of the box** with technologies of
the semantic web.
It also means that **your SEO will be improved** because **[Google leverages these formats](https://developers.google.com/search/docs/guides/intro-structured-data)**.
Last but not least, the server component of API Platform is built on top of the [Symfony](https://symfony.com) framework,
while client components leverage [React](https://reactjs.org/) (a [Vue.js](https://vuejs.org/) flavor is also available).
It means that you can:
* Use **thousands of Symfony bundles and React components** with API Platform.
* Integrate API Platform in **any existing Symfony or React application**.
* Reuse **all your Symfony and React skills**, benefit of the incredible amount of documentation available.
* Enjoy the popular [Doctrine ORM](https://www.doctrine-project.org/projects/orm.html) (used by default, but fully optional:
you can use the data provider you want, including but not limited to MongoDB and Elasticsearch)
## Install
[Read the official "Getting Started" guide](https://api-platform.com/docs/distribution).
## Credits
Created by [Kévin Dunglas](https://dunglas.fr). Commercial support available at [Les-Tilleuls.coop](https://les-tilleuls.coop).
## Comment lancer le serveur
pour lancer le serveur :
après avoir cloner le projet, rendez vous dans le dossier du projet(à sa racine) puis faites :
- docker-compose pull
- docker-compose up -d
le pull vise a télécharger les dépendance nécéssaires dans le container docker, le up lance le serveur.\
il faut ensuite mettre-à-jour le schema de la bd doctrine, ce qui se fait avec la commande :
- docker-compose exec php bin/console doctrine:schema:update -force
maintenant que la base de donnée est setup, il va falloir la remplir, pour celui nous allons avoir besoin d'un bundle apporté ar composer
pour installer ce bundle lancez la commande
- docker-compose exec php composer require --dev doctrine/doctrine-fixtures-bundle
cette commande installe les dépendances de fixtureBundle,
pour finir, après avoir télécharger les fichiers de données (les fichier valeursfoncière20XX.txt) deplacez ces 5 fichiers dans le dossier api/src/DataFixtures/
puis pour load les données dans la base de doctrine :
- docker-compose exec php bin/console doctrine/doctrine:fixtures:load
le projet est pret à être utilisé.