Skip to content

Commit

Permalink
Merge 3.1
Browse files Browse the repository at this point in the history
  • Loading branch information
soyuka committed Nov 6, 2023
2 parents 3ab7e87 + c47b588 commit b1b4f14
Show file tree
Hide file tree
Showing 23 changed files with 206 additions and 106 deletions.
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/BooleanFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*
* Syntax: `?property=<true|false|1|0>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -94,7 +95,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -107,7 +108,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/ExistsFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
*
* Syntax: `?exists[property]=<true|false|1|0>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -98,7 +99,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/NumericFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*
* Syntax: `?property=<int|bigint|decimal...>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -94,7 +95,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`.
*
Expand Down
12 changes: 8 additions & 4 deletions src/Doctrine/Odm/Filter/OrderFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@
*
* Syntax: `?order[property]=<asc|desc>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -100,13 +101,15 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* 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:
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -179,7 +182,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* 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
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/RangeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@
*
* Syntax: `?property[<lt|gt|lte|gte|between>]=value`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -95,7 +96,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Odm/Filter/SearchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
*
* Syntax: `?property[]=foo&property[]=bar`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -129,7 +130,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* @author Kévin Dunglas <[email protected]>
* @author Alan Poulain <[email protected]>
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/BooleanFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*
* Syntax: `?property=<true|false|1|0>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -97,7 +98,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?published=true`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/DateFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -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
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -111,7 +112,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books by date with the following query: `/books?createdAt[after]=2018-03-19`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/ExistsFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@
*
* Syntax: `?exists[property]=<true|false|1|0>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -102,7 +103,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?exists[comment]=true`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/NumericFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*
* Syntax: `?property=<int|bigint|decimal...>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -97,7 +98,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price=10`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/OrderFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@
*
* Syntax: `?order[property]=<asc|desc>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -102,7 +103,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* 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`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/RangeFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,8 @@
*
* Syntax: `?property[<lt|gt|lte|gte|between>]=value`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -97,7 +98,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books with the following query: `/books?price[between]=12.99..15.99`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Doctrine/Orm/Filter/SearchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@
*
* Syntax: `?property[]=foo&property[]=bar`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -129,7 +130,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* @author Kévin Dunglas <[email protected]>
*/
Expand Down
6 changes: 4 additions & 2 deletions src/Elasticsearch/Filter/MatchFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*
* Syntax: `?property[]=value`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -90,7 +91,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books by title content with the following query: `/books?title=Foundation`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Elasticsearch/Filter/OrderFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@
*
* Syntax: `?order[property]=<asc|desc>`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -97,7 +98,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* 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`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Elasticsearch/Filter/TermFilter.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@
*
* Syntax: `?property[]=value`.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Book.php
Expand Down Expand Up @@ -89,7 +90,8 @@
* </resource>
* </resources>
* ```
* </CodeSelector>
*
* </div>
*
* Given that the collection endpoint is `/books`, you can filter books by title with the following query: `/books?title=Foundation`.
*
Expand Down
6 changes: 4 additions & 2 deletions src/Metadata/ApiProperty.php
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ public function __construct(
/**
* The `deprecationReason` option deprecates the current operation with a deprecation message.
*
* <CodeSelector>
* <div data-code-selector>
*
* ```php
* <?php
* // api/src/Entity/Review.php
Expand Down Expand Up @@ -90,7 +91,8 @@ public function __construct(
* <property resource="App\Entity\Review" name="letter" deprecationReason="Create a Book instead" />
* </properties>
* ```
* </CodeSelector>
*
* </div>
*
* - 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
Expand Down
Loading

0 comments on commit b1b4f14

Please sign in to comment.