Skip to content

bump-sh/Api-Platform-Demo

Repository files navigation

API Platform

API Platform is a next-generation web framework designed to easily create API-first projects without compromising extensibility and flexibility:

GitHub Actions Codecov

About Bump.sh

Bump.sh

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.

  1. 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 run bash docs/persist.sh)
  2. Create API documentation on Bump.sh.
  3. 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).
  4. Back on ApiPlatform, each time you change your API contract, persist changes in OpenAPI contact, by running bash docs/persist.sh
  5. 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) )
  6. 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

More about API Platform

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)

Install

Read the official "Getting Started" guide.

Credits

Created by Kévin Dunglas. Commercial support is available at Les-Tilleuls.coop.

About

Bootstrap API with ApiPlatform, with API changelog

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published