From bd65d5ef8258fecca378a3166c98dd2afd7c704d Mon Sep 17 00:00:00 2001 From: soyuka Date: Mon, 6 Nov 2023 17:10:40 +0100 Subject: [PATCH 1/2] docs: html code selector --- src/Doctrine/Odm/Filter/BooleanFilter.php | 4 +- src/Doctrine/Odm/Filter/DateFilter.php | 4 +- src/Doctrine/Odm/Filter/ExistsFilter.php | 4 +- src/Doctrine/Odm/Filter/NumericFilter.php | 4 +- src/Doctrine/Odm/Filter/OrderFilter.php | 8 ++- src/Doctrine/Odm/Filter/RangeFilter.php | 4 +- src/Doctrine/Odm/Filter/SearchFilter.php | 4 +- src/Doctrine/Orm/Filter/BooleanFilter.php | 4 +- src/Doctrine/Orm/Filter/DateFilter.php | 4 +- src/Doctrine/Orm/Filter/ExistsFilter.php | 4 +- src/Doctrine/Orm/Filter/NumericFilter.php | 4 +- src/Doctrine/Orm/Filter/OrderFilter.php | 4 +- src/Doctrine/Orm/Filter/RangeFilter.php | 4 +- src/Doctrine/Orm/Filter/SearchFilter.php | 4 +- src/Elasticsearch/Filter/MatchFilter.php | 4 +- src/Elasticsearch/Filter/OrderFilter.php | 4 +- src/Elasticsearch/Filter/TermFilter.php | 4 +- src/Metadata/ApiProperty.php | 4 +- src/Metadata/ApiResource.php | 62 ++++++++++++++++------- src/Metadata/HttpOperation.php | 4 +- src/Metadata/Operation.php | 56 +++++++++++++++----- src/Serializer/Filter/GroupFilter.php | 4 +- src/Serializer/Filter/PropertyFilter.php | 4 +- 23 files changed, 153 insertions(+), 53 deletions(-) diff --git a/src/Doctrine/Odm/Filter/BooleanFilter.php b/src/Doctrine/Odm/Filter/BooleanFilter.php index ed3a16ccceb..0851f16b12e 100644 --- a/src/Doctrine/Odm/Filter/BooleanFilter.php +++ b/src/Doctrine/Odm/Filter/BooleanFilter.php @@ -23,7 +23,8 @@ * * Syntax: `?property=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`. diff --git a/src/Doctrine/Odm/Filter/DateFilter.php b/src/Doctrine/Odm/Filter/DateFilter.php index 0aa81df608f..232445838d5 100644 --- a/src/Doctrine/Odm/Filter/DateFilter.php +++ b/src/Doctrine/Odm/Filter/DateFilter.php @@ -36,7 +36,8 @@ * - Consider items as youngest: use `ApiPlatform\Doctrine\Odm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`include_null_after`) strategy * - Always include items: use `ApiPlatform\Doctrine\Odm\Filter\DateFilter::INCLUDE_NULL_BEFORE_AND_AFTER` (`include_null_before_and_after`) strategy * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`. diff --git a/src/Doctrine/Odm/Filter/ExistsFilter.php b/src/Doctrine/Odm/Filter/ExistsFilter.php index 81ed2bced35..dd258098dbe 100644 --- a/src/Doctrine/Odm/Filter/ExistsFilter.php +++ b/src/Doctrine/Odm/Filter/ExistsFilter.php @@ -27,7 +27,8 @@ * * Syntax: `?exists[property]=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`. diff --git a/src/Doctrine/Odm/Filter/NumericFilter.php b/src/Doctrine/Odm/Filter/NumericFilter.php index 47f72b79676..2f3227f9e64 100644 --- a/src/Doctrine/Odm/Filter/NumericFilter.php +++ b/src/Doctrine/Odm/Filter/NumericFilter.php @@ -23,7 +23,8 @@ * * Syntax: `?property=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`. diff --git a/src/Doctrine/Odm/Filter/OrderFilter.php b/src/Doctrine/Odm/Filter/OrderFilter.php index f34dcb25b95..ce98af3d4bb 100644 --- a/src/Doctrine/Odm/Filter/OrderFilter.php +++ b/src/Doctrine/Odm/Filter/OrderFilter.php @@ -26,7 +26,8 @@ * * Syntax: `?order[property]=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`. * * By default, whenever the query does not specify the direction explicitly (e.g.: `/books?order[title]&order[id]`), filters will not be applied unless you configure a default order direction to use: * - * + *
+ * * ```php * * * ``` + * * * * When the property used for ordering can contain `null` values, you may want to specify how `null` values are treated in the comparison: diff --git a/src/Doctrine/Odm/Filter/RangeFilter.php b/src/Doctrine/Odm/Filter/RangeFilter.php index 4ef168a95ad..e18da44b332 100644 --- a/src/Doctrine/Odm/Filter/RangeFilter.php +++ b/src/Doctrine/Odm/Filter/RangeFilter.php @@ -23,7 +23,8 @@ * * Syntax: `?property[]=value`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`. diff --git a/src/Doctrine/Odm/Filter/SearchFilter.php b/src/Doctrine/Odm/Filter/SearchFilter.php index ea6c725c830..b604dd31d03 100644 --- a/src/Doctrine/Odm/Filter/SearchFilter.php +++ b/src/Doctrine/Odm/Filter/SearchFilter.php @@ -54,7 +54,8 @@ * * Syntax: `?property[]=foo&property[]=bar`. * - * + *
+ * * ```php * * * ``` + * * * * @author Kévin Dunglas diff --git a/src/Doctrine/Orm/Filter/BooleanFilter.php b/src/Doctrine/Orm/Filter/BooleanFilter.php index e0edd0098d0..f0041076643 100644 --- a/src/Doctrine/Orm/Filter/BooleanFilter.php +++ b/src/Doctrine/Orm/Filter/BooleanFilter.php @@ -25,7 +25,8 @@ * * Syntax: `?property=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`. diff --git a/src/Doctrine/Orm/Filter/DateFilter.php b/src/Doctrine/Orm/Filter/DateFilter.php index 0317b854354..e23a357446a 100644 --- a/src/Doctrine/Orm/Filter/DateFilter.php +++ b/src/Doctrine/Orm/Filter/DateFilter.php @@ -39,7 +39,8 @@ * - Consider items as youngest: use `ApiPlatform\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_AFTER` (`include_null_after`) strategy * - Always include items: use `ApiPlatform\Doctrine\Orm\Filter\DateFilter::INCLUDE_NULL_BEFORE_AND_AFTER` (`include_null_before_and_after`) strategy * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`. diff --git a/src/Doctrine/Orm/Filter/ExistsFilter.php b/src/Doctrine/Orm/Filter/ExistsFilter.php index a222e166f7b..60a1ffbe4fe 100644 --- a/src/Doctrine/Orm/Filter/ExistsFilter.php +++ b/src/Doctrine/Orm/Filter/ExistsFilter.php @@ -30,7 +30,8 @@ * * Syntax: `?exists[property]=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`. diff --git a/src/Doctrine/Orm/Filter/NumericFilter.php b/src/Doctrine/Orm/Filter/NumericFilter.php index a2033d4c0cf..6c8070c823c 100644 --- a/src/Doctrine/Orm/Filter/NumericFilter.php +++ b/src/Doctrine/Orm/Filter/NumericFilter.php @@ -25,7 +25,8 @@ * * Syntax: `?property=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`. diff --git a/src/Doctrine/Orm/Filter/OrderFilter.php b/src/Doctrine/Orm/Filter/OrderFilter.php index 5a24e6c7a76..55cf37e6722 100644 --- a/src/Doctrine/Orm/Filter/OrderFilter.php +++ b/src/Doctrine/Orm/Filter/OrderFilter.php @@ -28,7 +28,8 @@ * * Syntax: `?order[property]=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`. diff --git a/src/Doctrine/Orm/Filter/RangeFilter.php b/src/Doctrine/Orm/Filter/RangeFilter.php index 4d44ad4dde5..e27e7e07175 100644 --- a/src/Doctrine/Orm/Filter/RangeFilter.php +++ b/src/Doctrine/Orm/Filter/RangeFilter.php @@ -25,7 +25,8 @@ * * Syntax: `?property[]=value`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`. diff --git a/src/Doctrine/Orm/Filter/SearchFilter.php b/src/Doctrine/Orm/Filter/SearchFilter.php index af1f9cb92ad..62b78702b9a 100644 --- a/src/Doctrine/Orm/Filter/SearchFilter.php +++ b/src/Doctrine/Orm/Filter/SearchFilter.php @@ -54,7 +54,8 @@ * * Syntax: `?property[]=foo&property[]=bar`. * - * + *
+ * * ```php * * * ``` + * * * * @author Kévin Dunglas diff --git a/src/Elasticsearch/Filter/MatchFilter.php b/src/Elasticsearch/Filter/MatchFilter.php index 24b5bc7c6b7..5e07d830428 100644 --- a/src/Elasticsearch/Filter/MatchFilter.php +++ b/src/Elasticsearch/Filter/MatchFilter.php @@ -18,7 +18,8 @@ * * Syntax: `?property[]=value`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by title content with the following query: `/books?title=Foundation`. diff --git a/src/Elasticsearch/Filter/OrderFilter.php b/src/Elasticsearch/Filter/OrderFilter.php index b00f36a3f0d..22ed6541c40 100644 --- a/src/Elasticsearch/Filter/OrderFilter.php +++ b/src/Elasticsearch/Filter/OrderFilter.php @@ -24,7 +24,8 @@ * * Syntax: `?order[property]=`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by ID and date in ascending or descending order: `/books?order[id]=asc&order[date]=desc`. diff --git a/src/Elasticsearch/Filter/TermFilter.php b/src/Elasticsearch/Filter/TermFilter.php index 2dd4fc29469..d4ecdf1a85c 100644 --- a/src/Elasticsearch/Filter/TermFilter.php +++ b/src/Elasticsearch/Filter/TermFilter.php @@ -18,7 +18,8 @@ * * Syntax: `?property[]=value`. * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by title with the following query: `/books?title=Foundation`. diff --git a/src/Metadata/ApiProperty.php b/src/Metadata/ApiProperty.php index c9fa67f6692..daa688f9bfb 100644 --- a/src/Metadata/ApiProperty.php +++ b/src/Metadata/ApiProperty.php @@ -54,7 +54,8 @@ public function __construct( /** * The `deprecationReason` option deprecates the current operation with a deprecation message. * - * + *
+ * * ```php * * * ``` + * * * * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure diff --git a/src/Metadata/ApiResource.php b/src/Metadata/ApiResource.php index b0b65a04336..74f1c32da4e 100644 --- a/src/Metadata/ApiResource.php +++ b/src/Metadata/ApiResource.php @@ -193,7 +193,7 @@ public function __construct( /** * The `sunset` option indicates when a deprecated operation will be removed. * - * + *
* * ```php * + *
+ * * ```php * * * ``` + * * */ protected ?int $urlGenerationStrategy = null, /** * The `deprecationReason` option deprecates the current resource with a deprecation message. * - * + *
+ * * ```php * * * ``` + * * * * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure @@ -341,7 +345,8 @@ public function __construct( /** * The `filters` option configures the filters (declared as services) available on the collection routes for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?array $filters = null, @@ -384,7 +390,8 @@ public function __construct( /** * The `messenger` option dispatches the current resource through the Message Bus. * - * + *
+ * * ```php * * * ``` + * * * * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it @@ -436,7 +444,7 @@ public function __construct( * By default, items in the collection are ordered in ascending (ASC) order by their resource identifier(s). If you want to * customize this order, you must add an `order` attribute on your ApiResource annotation: * - * + *
* * ```php * + *
+ * * ```php * * * ``` + * * * * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`: @@ -511,7 +521,8 @@ public function __construct( /** * The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current resource. * - * + *
+ * * ```php * * * ``` + * * * * The number of items can now be set by adding a query parameter named `itemsPerPage`: @@ -552,7 +564,7 @@ public function __construct( /** * The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current resource. * - * + *
* * ```php * * * ``` + * * * * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`: @@ -597,7 +610,8 @@ public function __construct( * Select your unique sorted field as well as the direction you'll like the pagination to go via filters. * Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:. * - * + *
+ * * ```php * * * ``` + * * * * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723). @@ -653,7 +668,8 @@ public function __construct( /** * The `paginationEnabled` option enables (or disables) the pagination for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?bool $paginationEnabled = null, @@ -696,7 +713,8 @@ public function __construct( * When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the * correct number of results. You can configure this using the `paginationFetchJoinCollection` option: * - * + *
+ * * ```php * * * ``` + * * * * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. @@ -741,7 +760,8 @@ public function __construct( * When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types * of queries. You can configure this using the `paginationUseOutputWalkers` option: * - * + *
+ * * ```php * * * ``` + * * * * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. @@ -780,7 +801,8 @@ public function __construct( /** * The `paginationItemsPerPage` option defines the number of items per page for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?int $paginationItemsPerPage = null, /** * The `paginationMaximumItemsPerPage` option defines the maximum number of items per page for the current resource. * - * + *
+ * * ```php * + *
+ * * ```php * * * ``` + * * */ protected ?bool $paginationPartial = null, /** * The `paginationType` option defines the type of pagination (`page` or `cursor`) to use for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?string $paginationType = null, diff --git a/src/Metadata/HttpOperation.php b/src/Metadata/HttpOperation.php index 009db7b56cc..dcf5c4b45a8 100644 --- a/src/Metadata/HttpOperation.php +++ b/src/Metadata/HttpOperation.php @@ -92,7 +92,8 @@ public function __construct( /** * The `sunset` option indicates when a deprecated operation will be removed. * - * + *
+ * * ```php * * * ``` + * * */ protected ?string $sunset = null, diff --git a/src/Metadata/Operation.php b/src/Metadata/Operation.php index 844d7098d4d..82f4f7fc437 100644 --- a/src/Metadata/Operation.php +++ b/src/Metadata/Operation.php @@ -66,7 +66,8 @@ public function __construct( /** * The `paginationEnabled` option enables (or disables) the pagination for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * */ protected ?bool $paginationEnabled = null, /** * The `paginationType` option defines the type of pagination (`page` or `cursor`) to use for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * */ protected ?string $paginationType = null, /** * The `paginationItemsPerPage` option defines the number of items per page for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * */ protected ?int $paginationItemsPerPage = null, /** * The `paginationMaximumItemsPerPage` option defines the maximum number of items per page for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?int $paginationMaximumItemsPerPage = null, /** * The `paginationPartial` option enables (or disables) the partial pagination for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * */ protected ?bool $paginationPartial = null, /** * The `paginationClientEnabled` option allows (or disallows) the client to enable (or disable) the pagination for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * * * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`: @@ -330,7 +342,8 @@ public function __construct( /** * The `paginationClientItemsPerPage` option allows (or disallows) the client to set the number of items per page for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * * * The number of items can now be set by adding a query parameter named `itemsPerPage`: @@ -376,7 +390,8 @@ public function __construct( /** * The `paginationClientPartial` option allows (or disallows) the client to enable (or disable) the partial pagination for the current collection operation. * - * + *
+ * * ```php * * * ``` + * * * * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`: @@ -428,7 +444,8 @@ public function __construct( * When set to `true`, the Doctrine ORM Paginator will perform an additional query, in order to get the * correct number of results. You can configure this using the `paginationFetchJoinCollection` option: * - * + *
+ * * ```php * * * ``` + * * * * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. @@ -478,7 +496,8 @@ public function __construct( * When set to `true`, the Doctrine ORM Paginator will use output walkers, which are compulsory for some types * of queries. You can configure this using the `paginationUseOutputWalkers` option: * - * + *
+ * * ```php * * * ``` + * * * * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. @@ -525,7 +545,8 @@ public function __construct( * Select your unique sorted field as well as the direction you'll like the pagination to go via filters. * Note that for now you have to declare a `RangeFilter` and an `OrderFilter` on the property used for the cursor-based pagination:. * - * + *
+ * * ```php * * * ``` + * * * * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723). @@ -598,7 +620,8 @@ public function __construct( /** * The `deprecationReason` option deprecates the current operation with a deprecation message. * - * + *
+ * * ```php * * * ``` + * * * * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure @@ -646,7 +670,8 @@ public function __construct( /** * The `filters` option configures the filters (declared as services) available on the collection routes for the current resource. * - * + *
+ * * ```php * * * ``` + * * */ protected ?array $filters = null, @@ -708,7 +734,8 @@ public function __construct( /** * The `messenger` option dispatches the current resource through the Message Bus. * - * + *
+ * * ```php * * * ``` + * * * * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it diff --git a/src/Serializer/Filter/GroupFilter.php b/src/Serializer/Filter/GroupFilter.php index 6d7f16d1bb7..872fb0695b4 100644 --- a/src/Serializer/Filter/GroupFilter.php +++ b/src/Serializer/Filter/GroupFilter.php @@ -28,7 +28,8 @@ * - `overrideDefaultGroups` allows to override the default serialization groups (default: `false`) * - `whitelist` groups whitelist to avoid uncontrolled data exposure (default: `null` to allow all groups) * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter books by serialization groups with the following query: `/books?groups[]=read&groups[]=write`. diff --git a/src/Serializer/Filter/PropertyFilter.php b/src/Serializer/Filter/PropertyFilter.php index 53576291ed4..0de6a8b0a10 100644 --- a/src/Serializer/Filter/PropertyFilter.php +++ b/src/Serializer/Filter/PropertyFilter.php @@ -31,7 +31,8 @@ * - `overrideDefaultProperties` allows to override the default serialization properties (default: `false`) * - `whitelist` properties whitelist to avoid uncontrolled data exposure (default: `null` to allow all properties) * - * + *
+ * * ```php * * * ``` + * * * * Given that the collection endpoint is `/books`, you can filter the serialization properties with the following query: `/books?properties[]=title&properties[]=author`. If you want to include some properties of the nested "author" document, use: `/books?properties[]=title&properties[author][]=name`. From c47b588c426b0c9896ec2401ac3dcbdd9d6ef80e Mon Sep 17 00:00:00 2001 From: soyuka Date: Mon, 6 Nov 2023 17:13:16 +0100 Subject: [PATCH 2/2] docs: html code selector --- src/Doctrine/Odm/Filter/BooleanFilter.php | 2 +- src/Doctrine/Odm/Filter/DateFilter.php | 2 +- src/Doctrine/Odm/Filter/ExistsFilter.php | 2 +- src/Doctrine/Odm/Filter/NumericFilter.php | 2 +- src/Doctrine/Odm/Filter/OrderFilter.php | 4 +-- src/Doctrine/Odm/Filter/RangeFilter.php | 2 +- src/Doctrine/Odm/Filter/SearchFilter.php | 2 +- src/Doctrine/Orm/Filter/BooleanFilter.php | 2 +- src/Doctrine/Orm/Filter/DateFilter.php | 2 +- src/Doctrine/Orm/Filter/ExistsFilter.php | 2 +- src/Doctrine/Orm/Filter/NumericFilter.php | 2 +- src/Doctrine/Orm/Filter/OrderFilter.php | 2 +- src/Doctrine/Orm/Filter/RangeFilter.php | 2 +- src/Doctrine/Orm/Filter/SearchFilter.php | 2 +- src/Elasticsearch/Filter/MatchFilter.php | 2 +- src/Elasticsearch/Filter/OrderFilter.php | 2 +- src/Elasticsearch/Filter/TermFilter.php | 2 +- src/Metadata/ApiProperty.php | 2 +- src/Metadata/ApiResource.php | 34 +++++++++++------------ src/Metadata/HttpOperation.php | 2 +- src/Metadata/Operation.php | 28 +++++++++---------- src/Serializer/Filter/GroupFilter.php | 2 +- src/Serializer/Filter/PropertyFilter.php | 2 +- 23 files changed, 53 insertions(+), 53 deletions(-) diff --git a/src/Doctrine/Odm/Filter/BooleanFilter.php b/src/Doctrine/Odm/Filter/BooleanFilter.php index 0851f16b12e..15f91deaf92 100644 --- a/src/Doctrine/Odm/Filter/BooleanFilter.php +++ b/src/Doctrine/Odm/Filter/BooleanFilter.php @@ -96,7 +96,7 @@ * * ``` * - * + *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`. * diff --git a/src/Doctrine/Odm/Filter/DateFilter.php b/src/Doctrine/Odm/Filter/DateFilter.php index 232445838d5..0b848b2a49b 100644 --- a/src/Doctrine/Odm/Filter/DateFilter.php +++ b/src/Doctrine/Odm/Filter/DateFilter.php @@ -109,7 +109,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`. * diff --git a/src/Doctrine/Odm/Filter/ExistsFilter.php b/src/Doctrine/Odm/Filter/ExistsFilter.php index dd258098dbe..7235b25d3f7 100644 --- a/src/Doctrine/Odm/Filter/ExistsFilter.php +++ b/src/Doctrine/Odm/Filter/ExistsFilter.php @@ -100,7 +100,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`. * diff --git a/src/Doctrine/Odm/Filter/NumericFilter.php b/src/Doctrine/Odm/Filter/NumericFilter.php index 2f3227f9e64..8d9174c42ac 100644 --- a/src/Doctrine/Odm/Filter/NumericFilter.php +++ b/src/Doctrine/Odm/Filter/NumericFilter.php @@ -96,7 +96,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`. * diff --git a/src/Doctrine/Odm/Filter/OrderFilter.php b/src/Doctrine/Odm/Filter/OrderFilter.php index ce98af3d4bb..bb87d452b47 100644 --- a/src/Doctrine/Odm/Filter/OrderFilter.php +++ b/src/Doctrine/Odm/Filter/OrderFilter.php @@ -102,7 +102,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`. * @@ -183,7 +183,7 @@ * * ``` * - *
+ *
* * When the property used for ordering can contain `null` values, you may want to specify how `null` values are treated in the comparison: * - Use the default behavior of the DBMS: use `null` strategy diff --git a/src/Doctrine/Odm/Filter/RangeFilter.php b/src/Doctrine/Odm/Filter/RangeFilter.php index e18da44b332..0550037213a 100644 --- a/src/Doctrine/Odm/Filter/RangeFilter.php +++ b/src/Doctrine/Odm/Filter/RangeFilter.php @@ -97,7 +97,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`. * diff --git a/src/Doctrine/Odm/Filter/SearchFilter.php b/src/Doctrine/Odm/Filter/SearchFilter.php index b604dd31d03..1b9aa7c87b7 100644 --- a/src/Doctrine/Odm/Filter/SearchFilter.php +++ b/src/Doctrine/Odm/Filter/SearchFilter.php @@ -129,7 +129,7 @@ * * ``` * - *
+ *
* * @author Kévin Dunglas * @author Alan Poulain diff --git a/src/Doctrine/Orm/Filter/BooleanFilter.php b/src/Doctrine/Orm/Filter/BooleanFilter.php index f0041076643..cb040c49a42 100644 --- a/src/Doctrine/Orm/Filter/BooleanFilter.php +++ b/src/Doctrine/Orm/Filter/BooleanFilter.php @@ -99,7 +99,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`. * diff --git a/src/Doctrine/Orm/Filter/DateFilter.php b/src/Doctrine/Orm/Filter/DateFilter.php index e23a357446a..d895cc68cbc 100644 --- a/src/Doctrine/Orm/Filter/DateFilter.php +++ b/src/Doctrine/Orm/Filter/DateFilter.php @@ -113,7 +113,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`. * diff --git a/src/Doctrine/Orm/Filter/ExistsFilter.php b/src/Doctrine/Orm/Filter/ExistsFilter.php index 60a1ffbe4fe..f7f2cbab842 100644 --- a/src/Doctrine/Orm/Filter/ExistsFilter.php +++ b/src/Doctrine/Orm/Filter/ExistsFilter.php @@ -104,7 +104,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`. * diff --git a/src/Doctrine/Orm/Filter/NumericFilter.php b/src/Doctrine/Orm/Filter/NumericFilter.php index 6c8070c823c..bbcd1d67a0f 100644 --- a/src/Doctrine/Orm/Filter/NumericFilter.php +++ b/src/Doctrine/Orm/Filter/NumericFilter.php @@ -99,7 +99,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`. * diff --git a/src/Doctrine/Orm/Filter/OrderFilter.php b/src/Doctrine/Orm/Filter/OrderFilter.php index 55cf37e6722..abece578049 100644 --- a/src/Doctrine/Orm/Filter/OrderFilter.php +++ b/src/Doctrine/Orm/Filter/OrderFilter.php @@ -104,7 +104,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by title in ascending order and then by ID in descending order with the following query: `/books?order[title]=desc&order[id]=asc`. * diff --git a/src/Doctrine/Orm/Filter/RangeFilter.php b/src/Doctrine/Orm/Filter/RangeFilter.php index e27e7e07175..5952256b998 100644 --- a/src/Doctrine/Orm/Filter/RangeFilter.php +++ b/src/Doctrine/Orm/Filter/RangeFilter.php @@ -99,7 +99,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`. * diff --git a/src/Doctrine/Orm/Filter/SearchFilter.php b/src/Doctrine/Orm/Filter/SearchFilter.php index 62b78702b9a..4add8773be1 100644 --- a/src/Doctrine/Orm/Filter/SearchFilter.php +++ b/src/Doctrine/Orm/Filter/SearchFilter.php @@ -129,7 +129,7 @@ * * ``` * - *
+ *
* * @author Kévin Dunglas */ diff --git a/src/Elasticsearch/Filter/MatchFilter.php b/src/Elasticsearch/Filter/MatchFilter.php index 5e07d830428..d9e21a2ee2d 100644 --- a/src/Elasticsearch/Filter/MatchFilter.php +++ b/src/Elasticsearch/Filter/MatchFilter.php @@ -92,7 +92,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by title content with the following query: `/books?title=Foundation`. * diff --git a/src/Elasticsearch/Filter/OrderFilter.php b/src/Elasticsearch/Filter/OrderFilter.php index 22ed6541c40..0a98c397f50 100644 --- a/src/Elasticsearch/Filter/OrderFilter.php +++ b/src/Elasticsearch/Filter/OrderFilter.php @@ -99,7 +99,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by ID and date in ascending or descending order: `/books?order[id]=asc&order[date]=desc`. * diff --git a/src/Elasticsearch/Filter/TermFilter.php b/src/Elasticsearch/Filter/TermFilter.php index d4ecdf1a85c..fba2c549c64 100644 --- a/src/Elasticsearch/Filter/TermFilter.php +++ b/src/Elasticsearch/Filter/TermFilter.php @@ -91,7 +91,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by title with the following query: `/books?title=Foundation`. * diff --git a/src/Metadata/ApiProperty.php b/src/Metadata/ApiProperty.php index daa688f9bfb..9851f83b49f 100644 --- a/src/Metadata/ApiProperty.php +++ b/src/Metadata/ApiProperty.php @@ -91,7 +91,7 @@ public function __construct( * * ``` * - *
+ *
* * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added diff --git a/src/Metadata/ApiResource.php b/src/Metadata/ApiResource.php index 74f1c32da4e..0b1f642b45d 100644 --- a/src/Metadata/ApiResource.php +++ b/src/Metadata/ApiResource.php @@ -228,7 +228,7 @@ public function __construct( * * ``` * - * + *
*/ protected ?string $sunset = null, protected ?string $acceptPatch = null, @@ -277,7 +277,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?int $urlGenerationStrategy = null, /** @@ -317,7 +317,7 @@ public function __construct( * * ``` * - *
+ *
* * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added @@ -382,7 +382,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?array $filters = null, protected ?bool $elasticsearch = null, @@ -424,7 +424,7 @@ public function __construct( * * ``` * - *
+ *
* * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it * to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor) @@ -466,7 +466,7 @@ public function __construct( * foo: ASC * ``` * - *
+ *
* * This `order` attribute is used as an array: the key defines the order field, the values defines the direction. * If you only specify the key, `ASC` direction will be used as default. @@ -511,7 +511,7 @@ public function __construct( * * ``` * - *
+ *
* * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`: * - `GET /books?pagination=false`: disabled @@ -555,7 +555,7 @@ public function __construct( * * ``` * - *
+ *
* * The number of items can now be set by adding a query parameter named `itemsPerPage`: * - `GET /books?itemsPerPage=50` @@ -598,7 +598,7 @@ public function __construct( * * ``` * - *
+ *
* * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`: * - `GET /books?partial=false`: disabled @@ -660,7 +660,7 @@ public function __construct( * * ``` * - * + *
* * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723). */ @@ -702,7 +702,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?bool $paginationEnabled = null, /** @@ -747,7 +747,7 @@ public function __construct( * * ``` * - *
+ *
* * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. */ @@ -793,7 +793,7 @@ public function __construct( * * ``` * - *
+ *
* * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. */ @@ -834,7 +834,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?int $paginationItemsPerPage = null, /** @@ -873,7 +873,7 @@ public function __construct( * * ``` * - * + *
*/ protected ?int $paginationMaximumItemsPerPage = null, /** @@ -912,7 +912,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?bool $paginationPartial = null, /** @@ -951,7 +951,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?string $paginationType = null, protected ?string $security = null, diff --git a/src/Metadata/HttpOperation.php b/src/Metadata/HttpOperation.php index dcf5c4b45a8..6724dbe1197 100644 --- a/src/Metadata/HttpOperation.php +++ b/src/Metadata/HttpOperation.php @@ -133,7 +133,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?string $sunset = null, protected ?string $acceptPatch = null, diff --git a/src/Metadata/Operation.php b/src/Metadata/Operation.php index 82f4f7fc437..bfa7b2c07c4 100644 --- a/src/Metadata/Operation.php +++ b/src/Metadata/Operation.php @@ -106,7 +106,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?bool $paginationEnabled = null, /** @@ -152,7 +152,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?string $paginationType = null, /** @@ -197,7 +197,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?int $paginationItemsPerPage = null, /** @@ -242,7 +242,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?int $paginationMaximumItemsPerPage = null, /** @@ -287,7 +287,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?bool $paginationPartial = null, /** @@ -332,7 +332,7 @@ public function __construct( * * ``` * - *
+ *
* * The pagination can now be enabled (or disabled) by adding a query parameter named `pagination`: * - `GET /books?pagination=false`: disabled @@ -381,7 +381,7 @@ public function __construct( * * ``` * - *
+ *
* * The number of items can now be set by adding a query parameter named `itemsPerPage`: * - `GET /books?itemsPerPage=50` @@ -429,7 +429,7 @@ public function __construct( * * ``` * - *
+ *
* * The partial pagination can now be enabled (or disabled) by adding a query parameter named `partial`: * - `GET /books?partial=false`: disabled @@ -483,7 +483,7 @@ public function __construct( * * ``` * - *
+ *
* * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. */ @@ -535,7 +535,7 @@ public function __construct( * * ``` * - *
+ *
* * For more information, please see the [Pagination](https://www.doctrine-project.org/projects/doctrine-orm/en/current/tutorials/pagination.html) entry in the Doctrine ORM documentation. */ @@ -601,7 +601,7 @@ public function __construct( * * ``` * - *
+ *
* * To know more about cursor-based pagination take a look at [this blog post on medium (draft)](https://medium.com/@sroze/74fd1d324723). */ @@ -660,7 +660,7 @@ public function __construct( * * ``` * - *
+ *
* * - With JSON-lD / Hydra, [an `owl:deprecated` annotation property](https://www.w3.org/TR/owl2-syntax/#Annotation_Properties) will be added to the appropriate data structure * - With Swagger / OpenAPI, [a `deprecated` property](https://swagger.io/docs/specification/2-0/paths-and-operations/) will be added @@ -713,7 +713,7 @@ public function __construct( * * ``` * - *
+ *
*/ protected ?array $filters = null, /** @@ -774,7 +774,7 @@ public function __construct( * * ``` * - *
+ *
* * Note: when using `messenger=true` on a Doctrine entity, the Doctrine Processor is not called. If you want it * to be called, you should [decorate a built-in state processor](/docs/guide/hook-a-persistence-layer-with-a-processor) diff --git a/src/Serializer/Filter/GroupFilter.php b/src/Serializer/Filter/GroupFilter.php index 872fb0695b4..ff4101f2054 100644 --- a/src/Serializer/Filter/GroupFilter.php +++ b/src/Serializer/Filter/GroupFilter.php @@ -104,7 +104,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter books by serialization groups with the following query: `/books?groups[]=read&groups[]=write`. * diff --git a/src/Serializer/Filter/PropertyFilter.php b/src/Serializer/Filter/PropertyFilter.php index 0de6a8b0a10..d9291757c75 100644 --- a/src/Serializer/Filter/PropertyFilter.php +++ b/src/Serializer/Filter/PropertyFilter.php @@ -107,7 +107,7 @@ * * ``` * - *
+ *
* * Given that the collection endpoint is `/books`, you can filter the serialization properties with the following query: `/books?properties[]=title&properties[]=author`. If you want to include some properties of the nested "author" document, use: `/books?properties[]=title&properties[author][]=name`. *