The international conference on the API Platform Framework
Be part of the very first meeting with the FrankenPHP elePHPant plushies in Lille.
This edition is shaping up to be our biggest yet — secure your seat now before we sell out.
API Platform Admin has a native support for API exposing an OpenAPI documentation.
To use it, use the OpenApiAdmin
component, with the entrypoint of the API and the entrypoint of the OpenAPI documentation in JSON:
import { OpenApiAdmin } from "@api-platform/admin";
export default () => (
<OpenApiAdmin entrypoint="https://demo.api-platform.com" docEntrypoint="https://demo.api-platform.com/docs.json" />
);
Note: The OpenAPI documentation needs to follow some assumptions in order to be understood correctly by the underlying api-doc-parser
.
See the dedicated part in the api-doc-parser
library README.
By default, the component will use a very basic data provider, without pagination support.
If you want to use another data provider, pass the dataProvider
prop to the component:
import { OpenApiAdmin } from "@api-platform/admin";
import drfProvider from "ra-data-django-rest-framework";
export default () => (
<OpenApiAdmin
dataProvider={drfProvider("https://django-api.com")}
entrypoint="https://django-api.com"
docEntrypoint="https://django-api.com/docs.json"
/>
);
Mercure support can be enabled manually by giving the mercure
prop to the OpenApiAdmin
component.
See also the dedicated section.
You can also help us improve the documentation of this page.
Made with love by
Les-Tilleuls.coop can help you design and develop your APIs and web projects, and train your teams in API Platform, Symfony, Next.js, Kubernetes and a wide range of other technologies.
Learn more