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 ontology.
- 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, JSON-LD, Hydra, HAL, JSON:API, YAML, JSON, XML and CSV are supported out of the box.
- Enjoy the beautiful automatically generated API documentation (OpenAPI).
- Add a convenient Material Design administration interface built with React without writing a line of code.
- Scaffold fully functional Progressive-Web-Apps and mobile apps built with Next.js (React), Nuxt.js (Vue.js) or React Native thanks to the client generator (a Vue.js generator is also available).
- Install a development environment and deploy your project in production using Docker and Kubernetes.
- Easily add OAuth authentication.
- Create specs and tests with a developer friendly API testing tool.
This repo has been adapted for API Platform 2023 conference, to provide a live example of how an API changelog can easily built with Bump.sh.
The API documentation demo is available here: https://bump.sh/demo/doc/apiplatform-test-demo
The API changelog follows the API contract, i.e., the OpenAPI specification. Thus, persisting the OpenAPI contract during the API lifecycle is necessary.
We're sure there are many ways to do it; this repo implements an example,
based on API Platform command api:openapi:export
, and a GitHub action.
- Initialize OpenAPI specification on a given path (here, 'docs/openapi.json') by running
php bin/console api:openapi:export > docs/openapi.json
(in this repo, you can also runbash docs/persist.sh
) - Create API documentation on Bump.sh.
- On Bump.sh 'CI deployments' page, get API slug and token. We suggest to copy-paste GitHub action script into a new workflow (that's what we did on .github/workflows/bump.yml).
- Back on ApiPlatform, each time you change your API contract, persist changes in OpenAPI contact, by running
bash docs/persist.sh
- On GitHub, for each deployment on a branch (new branch, new commit, or even push --force), update the OpenAPI contract, too. Thus, Bump.sh adds a comment in PR each time a structure change is detected (for example #9 (comment) )
- By merging your branch on GitHub, your API documentation is also updated. And structure change is added to API changelog
Find more details about how to connect Bump.sh and ApiPlatform in our getting started guides
The official project documentation is available on the API Platform website.
API Platform embraces open web standards and the Linked Data movement. Your API will automatically expose structured data. 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.
Last but not least, the server component of API Platform is built on top of the Symfony framework, while client components leverage React (Vue.js flavors are 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, React, or Vue application.
- Reuse all your Symfony and JavaScript skills, and benefit from the incredible amount of documentation available.
- Enjoy the popular Doctrine ORM (used by default, but fully optional: you can use the data provider you want, including but not limited to MongoDB and Elasticsearch)
Read the official "Getting Started" guide.
Created by Kévin Dunglas. Commercial support is available at Les-Tilleuls.coop.