From 7ab699f9f2e327e84eb63fa379cf1b8bffae4357 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Fri, 18 Jul 2025 12:18:23 +0200 Subject: [PATCH 1/2] Added mention about OpenAPI --- docs/api/rest_api/rest_api_usage/rest_api_usage.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/docs/api/rest_api/rest_api_usage/rest_api_usage.md b/docs/api/rest_api/rest_api_usage/rest_api_usage.md index 656d04ac91..d9f0caa78c 100644 --- a/docs/api/rest_api/rest_api_usage/rest_api_usage.md +++ b/docs/api/rest_api/rest_api_usage/rest_api_usage.md @@ -11,6 +11,19 @@ Every interaction with the repository than you can do from back office or by usi The REST API uses HTTP methods (such as `GET` and `PUBLISH`), and HTTP headers to specify the type of request. +## OpenAPI support + +The REST API is built on top of [API Platform](https://api-platform.com/docs/symfony/) and meets the [OpenAPI](https://www.openapis.org/) standard. + +You can downlaod the OpenAPI specification from the [REST API Reference](/api/rest_api/rest_api_reference/rest_api_reference.html), or generate it for your project by running one of the command below: + +``` bash +php bin/console ibexa:openapi --output=spec.json # JSON output +php bin/console ibexa:openapi --yaml --output=spec.yaml # YAML output +``` + +With the specification file you can use the [available OpenAPI tools](https://tools.openapis.org/) to work faster with the API, for example, by generating libraries and clients for the API. + ## URIs The REST API is designed in such a way that the client can explore the Repository without constructing any URIs to resources. From 698c841fc6aa352a8b104c33912ff1bca3f84acd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Noco=C5=84?= Date: Mon, 21 Jul 2025 09:23:18 +0200 Subject: [PATCH 2/2] Added mention about local doc --- docs/api/rest_api/rest_api_usage/rest_api_usage.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/docs/api/rest_api/rest_api_usage/rest_api_usage.md b/docs/api/rest_api/rest_api_usage/rest_api_usage.md index d9f0caa78c..e53a933ba9 100644 --- a/docs/api/rest_api/rest_api_usage/rest_api_usage.md +++ b/docs/api/rest_api/rest_api_usage/rest_api_usage.md @@ -15,14 +15,18 @@ The REST API uses HTTP methods (such as `GET` and `PUBLISH`), and HTTP headers t The REST API is built on top of [API Platform](https://api-platform.com/docs/symfony/) and meets the [OpenAPI](https://www.openapis.org/) standard. -You can downlaod the OpenAPI specification from the [REST API Reference](/api/rest_api/rest_api_reference/rest_api_reference.html), or generate it for your project by running one of the command below: +You can download the OpenAPI specification from the [REST API Reference](/api/rest_api/rest_api_reference/rest_api_reference.html), or generate it for your project by running one of the commands below: ``` bash -php bin/console ibexa:openapi --output=spec.json # JSON output -php bin/console ibexa:openapi --yaml --output=spec.yaml # YAML output +php bin/console ibexa:openapi --output=openapi.json # JSON output +php bin/console ibexa:openapi --yaml --output=openapi.yaml # YAML output ``` -With the specification file you can use the [available OpenAPI tools](https://tools.openapis.org/) to work faster with the API, for example, by generating libraries and clients for the API. +Use the specification file with [available OpenAPI tools](https://tools.openapis.org/) to work faster with the API, for example, by generating libraries and clients for the API. + +!!! info + + In [Symfony's `dev` environment](environments.md), you can access a REST API reference generated for your project by visiting the `/api/ibexa/v2/doc` route in the browser. ## URIs