Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: api-platform/core
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v4.1.0
Choose a base ref
...
head repository: api-platform/core
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v4.1.1
Choose a head ref

Commits on Feb 8, 2025

  1. Copy the full SHA
    7007dcc View commit details

Commits on Feb 10, 2025

  1. Copy the full SHA
    6b035a6 View commit details

Commits on Feb 14, 2025

  1. Copy the full SHA
    d2e1963 View commit details

Commits on Feb 21, 2025

  1. Copy the full SHA
    a16147a View commit details
  2. docs: v4.0.18

    soyuka committed Feb 21, 2025
    Copy the full SHA
    21bf7b1 View commit details

Commits on Feb 24, 2025

  1. feat(laravel): add middleware granularity (#6962)

    Co-authored-by: soyuka <soyuka@users.noreply.github.com>
    jonerickson and soyuka authored Feb 24, 2025
    Copy the full SHA
    1dfefda View commit details

Commits on Feb 28, 2025

  1. Copy the full SHA
    6d2b24d View commit details
  2. docs: v4.0.19

    soyuka committed Feb 28, 2025
    Copy the full SHA
    f5a8d45 View commit details
  3. Merge 4.0

    soyuka committed Feb 28, 2025
    Copy the full SHA
    3b0a003 View commit details
  4. Merge 4.0 (#6990)

    Co-authored-by: soyuka <soyuka@users.noreply.github.com>
    Co-authored-by: Laurent Huzard <l.huzard@gmail.com>
    Co-authored-by: Jon Erickson <jon@deschutesdesigngroup.com>
    fix(symfony): detach objects to prevent loop when using Doctrine middleware and Mercure (#6936) (#6965)
    fix(laravel): handle route prefix (#6978)
    fixes #6969
    soyuka authored Feb 28, 2025
    Copy the full SHA
    b8881d4 View commit details
  5. docs: v4.1

    soyuka committed Feb 28, 2025
    Copy the full SHA
    d5d69a9 View commit details
  6. docs: laravel 12 compatibility

    soyuka committed Feb 28, 2025
    Copy the full SHA
    bbcbdd1 View commit details

Commits on Mar 7, 2025

  1. fix(doctrine): Add a proper exception when a doctrine manager could n…

    …ot be found for a resource class (#6995)
    
    * fix(doctrine): Add a proper exception when a doctrine manager could not be found for a resource class
    
    * Update ItemProvider.php
    
    ---------
    
    Co-authored-by: Antoine Bluchet <soyuka@users.noreply.github.com>
    lyrixx and soyuka authored Mar 7, 2025
    Copy the full SHA
    a434173 View commit details
  2. Copy the full SHA
    1e0bc9d View commit details
  3. Copy the full SHA
    b1e0c88 View commit details
  4. Copy the full SHA
    8697d66 View commit details

Commits on Mar 8, 2025

  1. fix(doctrine): mapping ArrayAccess deprecation (#6982)

    * fix: Doctrine mapping ArrayAccess deprecation
    
    * fix tests
    
    ---------
    
    Co-authored-by: soyuka <soyuka@users.noreply.github.com>
    dunglas and soyuka authored Mar 8, 2025
    Copy the full SHA
    2849370 View commit details

Commits on Mar 10, 2025

  1. ci: worflow repo typo

    soyuka committed Mar 10, 2025
    Copy the full SHA
    8eb80b5 View commit details
  2. ci: worflow dispatch

    soyuka committed Mar 10, 2025
    Copy the full SHA
    78293f5 View commit details
  3. fix(validation): deprecate string message for ValidationException con…

    …structor (#7005)
    
    The ValidationException constructor currently accepts a string as the first argument. This is being deprecated in favor of accepting a ConstraintViolationListInterface.
    
    fixes #6997
    soyuka authored Mar 10, 2025
    Copy the full SHA
    2771363 View commit details

Commits on Mar 11, 2025

  1. fix(symfony): add a alwaysBootKernel property for BC layer (#7007)

    * fix(symfony): implement $alwaysBootKernel property for bc-layer
    
    * fix(symfony): ensures that getContainer is not overriden
    
    * fix(symfony): update test for kernel boot strategy
    
    * fix(symfony): cs for trigger_deprecation
    
    * fix(symfony): possibility to hide deprecation and set alwaysBootKernel to false by default
    
    * fix(symfony): emulate 5.0 kernel behaviour for functional tests
    
    * fix(symfony): emulate 5.0 kernel behaviour for functional tests
    Crovitche-1623 authored Mar 11, 2025
    Copy the full SHA
    500062d View commit details

Commits on Mar 12, 2025

  1. Copy the full SHA
    7442b83 View commit details

Commits on Mar 13, 2025

  1. Copy the full SHA
    dd1b89f View commit details
  2. Copy the full SHA
    42991b9 View commit details

Commits on Mar 14, 2025

  1. Copy the full SHA
    1e7076c View commit details
  2. feat(laravel): stateOptions modelClass for eloquent (#7020)

    refactor(laravel): using trait to handle modelClass option
    test(laravel): add test to validate the modelClass option
    
    Co-authored-by: Guillaume Durand <guillaume.durand@6tm.com>
    soyuka and gd6tm authored Mar 14, 2025
    Copy the full SHA
    1298536 View commit details
  3. Copy the full SHA
    fcbd804 View commit details
  4. docs: changelog 4.0.20

    soyuka committed Mar 14, 2025
    Copy the full SHA
    1aa5017 View commit details
  5. Merge 4.0

    soyuka committed Mar 14, 2025
    Copy the full SHA
    578e15e View commit details
  6. docs: changelog 4.1.1

    soyuka committed Mar 14, 2025
    Copy the full SHA
    ba5cea7 View commit details
Showing with 75,540 additions and 61,041 deletions.
  1. +2 −2 .github/workflows/api_platform.yml
  2. +89 −0 CHANGELOG.md
  3. +9 −9 composer.json
  4. +1 −1 features/hydra/collection.feature
  5. +10 −12 features/hydra/error.feature
  6. +1 −1 features/jsonld/input_output.feature
  7. +1 −1 features/main/attribute_resource.feature
  8. +2 −2 features/main/crud.feature
  9. +2 −2 features/main/not_exposed.feature
  10. +5 −5 features/main/relation.feature
  11. +1 −1 features/main/union_intersect_types.feature
  12. +2 −5 features/main/validation.feature
  13. +2 −4 features/mongodb/filters.feature
  14. +5 −10 features/security/strong_typing.feature
  15. +1 −1 features/security/validate_incoming_content-types.feature
  16. +2 −7 features/serializer/vo_relations.feature
  17. +3,067 −3,005 package-lock.json
  18. +1 −1 src/Doctrine/Orm/Extension/EagerLoadingExtension.php
  19. +1 −1 src/Doctrine/Orm/Extension/ParameterExtension.php
  20. +4 −1 src/Doctrine/Orm/State/ItemProvider.php
  21. +17 −16 src/Doctrine/Orm/Tests/Extension/EagerLoadingExtensionTest.php
  22. +1 −1 src/Hydra/composer.json
  23. +4 −0 src/JsonLd/Serializer/ErrorNormalizer.php
  24. +91 −48 src/Laravel/ApiPlatformProvider.php
  25. +5 −0 src/Laravel/Eloquent/Extension/FilterQueryExtension.php
  26. +8 −2 src/Laravel/Eloquent/State/CollectionProvider.php
  27. +16 −2 src/Laravel/Eloquent/State/ItemProvider.php
  28. +1 −1 src/Laravel/Eloquent/State/LinksHandlerLocatorTrait.php
  29. +41 −0 src/Laravel/Eloquent/State/ModelClassTrait.php
  30. +14 −0 src/Laravel/Eloquent/State/Options.php
  31. +9 −0 src/Laravel/Tests/ApiTest.php
  32. +31 −0 src/Laravel/Tests/AutoconfigureTest.php
  33. +21 −0 src/Laravel/Tests/JsonLdTest.php
  34. +39 −0 src/Laravel/Tests/Unit/State/ItemProviderTest.php
  35. +10 −10 src/Laravel/composer.json
  36. +7 −0 src/Laravel/config/api-platform.php
  37. +1 −5 src/Laravel/phpstan.neon.dist
  38. +26 −15 src/Laravel/routes/api.php
  39. +3 −0 src/Laravel/testbench.yaml
  40. +36 −0 src/Laravel/workbench/app/ApiResource/ResourceWithModel.php
  41. +22 −0 src/Laravel/workbench/app/ApiResource/ServiceProvider.php
  42. +29 −0 src/Laravel/workbench/app/Models/PrefixedOperation.php
  43. +32 −0 src/Laravel/workbench/app/State/CustomProvider.php
  44. +1 −1 src/Metadata/ApiResource.php
  45. +3 −1 src/Metadata/Util/ReflectionClassRecursiveIterator.php
  46. +1 −1 src/Metadata/composer.json
  47. +4 −3 src/OpenApi/Factory/OpenApiFactory.php
  48. +50 −0 src/OpenApi/Tests/Factory/OpenApiFactoryTest.php
  49. +1 −0 src/OpenApi/composer.json
  50. +1 −1 src/State/composer.json
  51. +6 −6 src/Symfony/Bundle/Resources/public/fonts/open-sans/400.css
  52. +6 −6 src/Symfony/Bundle/Resources/public/fonts/open-sans/700.css
  53. +2,008 −3 src/Symfony/Bundle/Resources/public/graphiql/graphiql.css
  54. +69,443 −57,582 src/Symfony/Bundle/Resources/public/graphiql/graphiql.min.js
  55. +22 −15 src/Symfony/Bundle/Resources/public/graphql-playground/middleware.js
  56. +0 −31 src/Symfony/Bundle/Resources/public/react/react.production.min.js
  57. +203 −197 src/Symfony/Bundle/Resources/public/redoc/redoc.standalone.js
  58. +1 −1 src/Symfony/Bundle/Resources/public/swagger-ui/swagger-ui-bundle.js
  59. +1 −1 src/Symfony/Bundle/Resources/public/swagger-ui/swagger-ui-standalone-preset.js
  60. +1 −1 src/Symfony/Bundle/Resources/public/swagger-ui/swagger-ui.css
  61. +1 −1 src/Symfony/Bundle/Resources/public/swagger-ui/swagger-ui.css.map
  62. +20 −2 src/Symfony/Bundle/Test/ApiTestCase.php
  63. +19 −7 src/Symfony/Doctrine/EventListener/PublishMercureUpdatesListener.php
  64. +11 −3 src/Validator/Exception/ValidationException.php
  65. +1 −1 src/Validator/composer.json
  66. +2 −0 tests/Functional/ArrayDtoTest.php
  67. +2 −0 tests/Functional/BackedEnumPropertyTest.php
  68. +2 −0 tests/Functional/BackedEnumResourceTest.php
  69. +3 −1 tests/Functional/ErrorTest.php
  70. +2 −0 tests/Functional/FormatTest.php
  71. +2 −0 tests/Functional/HALCircularReference.php
  72. +2 −0 tests/Functional/HydraTest.php
  73. +2 −0 tests/Functional/Issues/Issue6926Test.php
  74. +3 −1 tests/Functional/ItemUriTemplateTest.php
  75. +2 −0 tests/Functional/JsonLdTest.php
  76. +2 −0 tests/Functional/OpenApiTest.php
  77. +2 −0 tests/Functional/Parameters/BooleanFilterTest.php
  78. +2 −0 tests/Functional/Parameters/DateFilterTest.php
  79. +2 −0 tests/Functional/Parameters/DoctrineTest.php
  80. +2 −0 tests/Functional/Parameters/ExistsFilterTest.php
  81. +2 −0 tests/Functional/Parameters/HydraTest.php
  82. +2 −0 tests/Functional/Parameters/NumericFilterTest.php
  83. +2 −0 tests/Functional/Parameters/OrderFilterTest.php
  84. +2 −0 tests/Functional/Parameters/ParameterProviderTest.php
  85. +2 −0 tests/Functional/Parameters/ParameterTest.php
  86. +2 −0 tests/Functional/Parameters/QueryParameterStateOptionsTest.php
  87. +2 −0 tests/Functional/Parameters/RangeFilterTest.php
  88. +2 −0 tests/Functional/Parameters/SecurityTest.php
  89. +2 −0 tests/Functional/Parameters/StrictParametersTest.php
  90. +2 −0 tests/Functional/Parameters/ValidationTest.php
  91. +4 −2 tests/JsonLd/Serializer/ErrorNormalizerTest.php
  92. +4 −0 tests/Symfony/Bundle/Test/ApiTestCaseTest.php
  93. +2 −0 tests/Symfony/Bundle/Test/ClientTest.php
  94. +2 −2 update-js.sh
4 changes: 2 additions & 2 deletions .github/workflows/api_platform.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ name: Distribution update
on:
push:
tags:
- v*
workflow_dispatch: ~

env:
GH_TOKEN: ${{ github.token }}
@@ -17,6 +17,6 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Update distribution
run: gh workflow run -R api-platform/api-platfom release.yml -f tag=${{ github.ref_name }}
run: gh workflow run -R api-platform/api-platform release.yml -f tag=${{ github.ref_name }}


89 changes: 89 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,65 @@
# Changelog

## v4.1.1

### Bug fixes

* [1e0bc9dc8](https://github.com/api-platform/core/commit/1e0bc9dc8ebe2f947ac0b3bc153047b0b28b0a17) fix(laravel): query extensions with item operations (#7001)
* [1e7076c65](https://github.com/api-platform/core/commit/1e7076c65aea9a2f09b0dcc6598ef2a705e0bb45) fix(laravel): register ErrorProvider (#7018)
* [2771363b0](https://github.com/api-platform/core/commit/2771363b03f1b1c27313ecd457f7a4934524151c) fix(validation): deprecate string message for ValidationException constructor (#7005)
* [500062da2](https://github.com/api-platform/core/commit/500062da2074585979e9a92939bc3b7a3c7554c5) fix(symfony): add a `alwaysBootKernel` property for BC layer (#7007)
* [8697d6630](https://github.com/api-platform/core/commit/8697d66304d276feeef6f838c8c54291d3563aab) fix(openapi): boolean "true" value in HttpOperation::openapi (#7003)
* [b1e0c889c](https://github.com/api-platform/core/commit/b1e0c889cc96602afc9c68fccb9da25a6b6fd354) fix(doctrine): correct the use statement for ManagerRegistry (#7004)
* [fcbd804b2](https://github.com/api-platform/core/commit/fcbd804b29907baba8878ca12ff013732e0326e4) fix(jsonld): duplicate error fields when prefix is enabled (#7021)

### Features

* [129853668](https://github.com/api-platform/core/commit/129853668c3fd66bcfe1a298a0f662c29545f7a4) feat(laravel): stateOptions modelClass for eloquent (#7020)
* [42991b941](https://github.com/api-platform/core/commit/42991b9418c340e44c9e30360e5dd4d869433859) feat(laravel): openapi export command (#7016)
* [dd1b89f9b](https://github.com/api-platform/core/commit/dd1b89f9b771544cb8449d7e9f8f4bbd80c615d2) feat(laravel): auto configure our tagged interfaces (#7014)

Also contains [v4.0.20 changes](#v4020).

## v4.1.0

### Bug fixes

* [da37ca91c](https://github.com/api-platform/core/commit/da37ca91c83e4f715c5acbbe3dc0296e8055bebc) fix(laravel): default to file cache instead of cache.default (#6955)
* [e041d721e](https://github.com/api-platform/core/commit/e041d721ea6fe24026eb021905740b25102d7966) fix: errors retrieval and documentation (#6952)
* [e6130cbcc](https://github.com/api-platform/core/commit/e6130cbccc1a8963b731769ef34f39e09f5d2cde) fix: missing filters on swagger ui entrypoint (#6950)
* [01fd74268](https://github.com/api-platform/core/commit/01fd74268cf0e4a289b31ea74bea7f4e089b8361) fix(laravel): restore accidentally removed BooleanFilter
* [db40a63e7](https://github.com/api-platform/core/commit/db40a63e729fe03be84111dac2b0774fea4ab343) fix(hydra): rdfs:label should not duplicate title (#6748)
* [deb2ed265](https://github.com/api-platform/core/commit/deb2ed265dfee7b8a73fd3b542aef3e29eca3412) fix(laravel): fix use laravel fillable for writable props (#6898)
* [67fbe51c5](https://github.com/api-platform/core/commit/67fbe51c570abe1ece6651ae6a037662e9012881) fix: reintroduce the `show_webby` parameter in Laravel config (#6741)

### Features

* [cb5ede1c5](https://github.com/api-platform/core/commit/cb5ede1c5171677a90dd2d96a87e73cd549c0218) feat: add checkMode parameter to control json schema validation (#6974)
* [771d9401c](https://github.com/api-platform/core/commit/771d9401cffa0463928bb35ab52a56b269d57e1b) feat(elasticsearch): re-introduce v7 support (#6827)
* [b5372ddee](https://github.com/api-platform/core/commit/b5372ddeef2067333761104f3c17ed1b86001bf4) feat(openapi): filter x-apiplatform-tags to produce different openapi specifications (#6945)
* [2e2debb94](https://github.com/api-platform/core/commit/2e2debb94b06752262b0d18b736edc22b501266b) feat(mongodb): Replace usage of deprecated method `AggregationBuilder::execute()` (#6933)
* [4bdf042e5](https://github.com/api-platform/core/commit/4bdf042e5cab1ddb931562cf98a97686d8c415ae) feat(mongodb): Add pagination metadata to the aggregation results (#6912)
* [b968ccd50](https://github.com/api-platform/core/commit/b968ccd5026afb5562c4c4588929885b86ecb3cb) feat(openapi): document error outputs using json-schemas (#6923)
* [c97db6bb2](https://github.com/api-platform/core/commit/c97db6bb2f6b2db9a6a17141bdb56bd51e9fc50d) feat: swagger ui persist authorization option (#6877)
* [00787f32d](https://github.com/api-platform/core/commit/00787f32da54418de7d869cff218e22d8ae2ae1d) feat(laravel): automatically register policies (#6623)
* [12c42096b](https://github.com/api-platform/core/commit/12c42096bb0006d6ebae60ae5d90e9b356f9a335) feat(metadata): ability to hide an hydra class/operation (#6871)
* [57f15cf4f](https://github.com/api-platform/core/commit/57f15cf4f38278315c5f31d3949416c9455ba0d0) feat(state): strict query parameters (#6399)
* [bd0e92936](https://github.com/api-platform/core/commit/bd0e92936f82d3cd4563cd45ebf1f73fd1db9f01) feat(openapi): HTTP Authentication Support for Swagger UI (#6665)
* [be98f4e01](https://github.com/api-platform/core/commit/be98f4e01a52d8341ef9b65ed2f4e3b46ab31165) feat(graphql): allow to configure max query depth and max query complexity (#6880)
* [c78ed0b78](https://github.com/api-platform/core/commit/c78ed0b78baf5d2e1b7444a9882ba039c70a3887) feat(laravel): boolean filter (#6806)
* [d0a442786](https://github.com/api-platform/core/commit/d0a44278630d201b91cbba0774a09f4eeaac88f7) feat(doctrine): enhance getLinksHandler with method validation and typo suggestions (#6874)
* [f67f6f1ac](https://github.com/api-platform/core/commit/f67f6f1acb6476182c18a3503f2a8bc80ae89a0b) feat(doctrine): doctrine filters like laravel eloquent filters (#6775)

## Notes

This version as the 4.0.19 is compatible with Laravel 12.
The [hydra patch](#6748) changes default `hydra:title` and uses the resource `shortname`. Previously the `hydra:title` information was duplicating the `hydra:description`.
The `rdfs:label` got removed from the `hydra:Class` as it was used instead of the `hydra:title`.
On `hydra:property` `rdfs:label` got renamed to `label` as the `rdfs` namespace is available in the context.
The `ApiPlatform\Metadata\ErrorResource` and the `ConstraintViolation` (`ValidationException` class) are now generated directly from your PHP classes, only our `ConstraintViolationList` is hard-written and documents the `ConstraintViolation::violation` property. Therefore, your [own error resources](https://api-platform.com/docs/guides/error-resource/) are also documented. On top of that, we now set the `rdfs:subClassOf` to `hydra:Error`.
`#[ApiProperty(hydra: false)]` allows you to skip a documented `hydra:supportedProperty` on a class.
On write operations, we added the [expectsHeader](https://www.hydra-cg.com/spec/latest/core/#hydra:expectsHeader) field.

## v4.1.0-beta.2

### Bug fixes
@@ -60,6 +120,35 @@ On write operations, we added the [expectsHeader](https://www.hydra-cg.com/spec/
* [d0a442786](https://github.com/api-platform/core/commit/d0a44278630d201b91cbba0774a09f4eeaac88f7) feat(doctrine): enhance getLinksHandler with method validation and typo suggestions (#6874)
* [f67f6f1ac](https://github.com/api-platform/core/commit/f67f6f1acb6476182c18a3503f2a8bc80ae89a0b) feat(doctrine): doctrine filters like laravel eloquent filters (#6775)

## v4.0.20

### Bug fixes

* [284937039](https://github.com/api-platform/core/commit/284937039c61d4516687c648f4a7581ec1686f3d) fix(doctrine): mapping ArrayAccess deprecation (#6982)
* [a434173b8](https://github.com/api-platform/core/commit/a434173b82f735041a79cb5f469ee0e731ca5956) fix(doctrine): Add a proper exception when a doctrine manager could not be found for a resource class (#6995)


### Features

## v4.0.19

### Bug fixes

* [1dfefda5e](https://github.com/api-platform/core/commit/1dfefda5e22b7ec03780e928e943097dd31ef68f) fix(laravel): add middleware granularity (#6962)

Compatibility with Laravel 12.

## v4.0.18

### Bug fixes

* [7007dcca8](https://github.com/api-platform/core/commit/7007dcca8649814d871db7abe0fd65dc9c94a176) fix(laravel): duplicate middleware in routes
* [a16147ab7](https://github.com/api-platform/core/commit/a16147ab7b36f5238700c6ee9ee9253ce1424808) fix(laravel): handle route prefix (#6978)
* [d2e1963c5](https://github.com/api-platform/core/commit/d2e1963c56733b3174ae37cbc27a1374eba80bee) fix(symfony): detach objects to prevent loop when using Doctrine middleware and Mercure (#6936) (#6965)


### Features

## v4.0.17

### Bug fixes
18 changes: 9 additions & 9 deletions composer.json
Original file line number Diff line number Diff line change
@@ -114,7 +114,7 @@
"symfony/property-info": "^6.4 || ^7.1",
"symfony/serializer": "^6.4 || ^7.0",
"symfony/translation-contracts": "^3.3",
"symfony/web-link": "^6.4 || ^7.0",
"symfony/web-link": "^6.4 || ^7.1",
"willdurand/negotiation": "^3.1"
},
"require-dev": {
@@ -132,16 +132,16 @@
"friends-of-behat/mink-extension": "^2.2",
"friends-of-behat/symfony-extension": "^2.1",
"guzzlehttp/guzzle": "^6.0 || ^7.0",
"illuminate/config": "^11.0",
"illuminate/contracts": "^11.0",
"illuminate/database": "^11.0",
"illuminate/http": "^11.0",
"illuminate/pagination": "^11.0",
"illuminate/routing": "^11.0",
"illuminate/support": "^11.0",
"illuminate/config": "^11.0 || ^12.0",
"illuminate/contracts": "^11.0 || ^12.0",
"illuminate/database": "^11.0 || ^12.0",
"illuminate/http": "^11.0 || ^12.0",
"illuminate/pagination": "^11.0 || ^12.0",
"illuminate/routing": "^11.0 || ^12.0",
"illuminate/support": "^11.0 || ^12.0",
"jangregor/phpstan-prophecy": "^1.0",
"justinrainbow/json-schema": "^5.2.11",
"laravel/framework": "^11.0",
"laravel/framework": "^11.0 || ^12.0",
"orchestra/testbench": "^9.1",
"phpspec/prophecy-phpunit": "^2.2",
"phpstan/extension-installer": "^1.1",
2 changes: 1 addition & 1 deletion features/hydra/collection.feature
Original file line number Diff line number Diff line change
@@ -479,7 +479,7 @@ Feature: Collections support

When I send a "GET" request to "/dummies?itemsPerPage=0&page=2"
Then the response status code should be 400
And the JSON node "description" should be equal to "Page should not be greater than 1 if limit is equal to 0"
And the JSON node "detail" should be equal to "Page should not be greater than 1 if limit is equal to 0"

Scenario: Cursor-based pagination with an empty collection
When I send a "GET" request to "/so_manies"
22 changes: 10 additions & 12 deletions features/hydra/error.feature
Original file line number Diff line number Diff line change
@@ -16,10 +16,10 @@ Feature: Error handling
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "title" should not exists
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist
And the JSON node "description" should exist
And the JSON node "description" should not exist
And the JSON node "hydra:description" should exist
And the JSON node "trace" should exist
And the JSON node "status" should exist
@@ -49,10 +49,8 @@ Feature: Error handling
}
],
"detail": "name: This value should not be blank.",
"title": "An error occurred",
"hydra:title": "An error occurred",
"hydra:description": "name: This value should not be blank.",
"description": "name: This value should not be blank.",
"type": "/validation_errors/c1051bb4-d103-4f74-8988-acbcafc7fdc3"
}
"""
@@ -69,7 +67,7 @@ Feature: Error handling
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "@context" should exist
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist

Scenario: Get an rfc 7807 not found error
@@ -84,9 +82,9 @@ Feature: Error handling
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "@context" should exist
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist
And the JSON node "description" should exist
And the JSON node "description" should not exist

Scenario: Get an rfc 7807 bad method error
When I add "Content-Type" header equal to "application/ld+json"
@@ -101,9 +99,9 @@ Feature: Error handling
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "@context" should exist
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist
And the JSON node "description" should exist
And the JSON node "description" should not exist

Scenario: Get an rfc 7807 validation error
When I add "Content-Type" header equal to "application/ld+json"
@@ -118,7 +116,7 @@ Feature: Error handling
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "@context" should exist
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist
And the JSON node "violations" should exist

@@ -133,8 +131,8 @@ Feature: Error handling
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "type" should exist
And the JSON node "title" should be equal to "An error occurred"
And the JSON node "hydra:title" should be equal to "An error occurred"
And the JSON node "detail" should exist
And the JSON node "description" should exist
And the JSON node "description" should not exist
And the JSON node "trace" should exist
And the JSON node "status" should exist
2 changes: 1 addition & 1 deletion features/jsonld/input_output.feature
Original file line number Diff line number Diff line change
@@ -309,7 +309,7 @@ Feature: JSON-LD DTO input and output
"""
Then the response status code should be 400
And the response should be in JSON
And the JSON node "description" should be equal to "The input data is misformatted."
And the JSON node "detail" should be equal to "The input data is misformatted."

@!mongodb
Scenario: Reset password through an input DTO without DataTransformer
2 changes: 1 addition & 1 deletion features/main/attribute_resource.feature
Original file line number Diff line number Diff line change
@@ -100,7 +100,7 @@ Feature: Resource attributes
And the response should be in JSON
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
And the header "Link" should contain '<http://www.w3.org/ns/hydra/error>; rel="http://www.w3.org/ns/json-ld#error"'
And the JSON node "description" should be equal to 'Unable to generate an IRI for the item of type "ApiPlatform\Tests\Fixtures\TestBundle\Entity\IncompleteUriVariableConfigured"'
And the JSON node "detail" should be equal to 'Unable to generate an IRI for the item of type "ApiPlatform\Tests\Fixtures\TestBundle\Entity\IncompleteUriVariableConfigured"'

Scenario: Uri variables with Post operation
When I add "Content-Type" header equal to "application/ld+json"
4 changes: 2 additions & 2 deletions features/main/crud.feature
Original file line number Diff line number Diff line change
@@ -96,7 +96,7 @@ Feature: Create-Retrieve-Update-Delete
When I add "Content-Type" header equal to "application/ld+json"
And I send a "POST" request to "/dummies"
Then the response status code should be 400
And the JSON node "description" should be equal to "Syntax error"
And the JSON node "detail" should be equal to "Syntax error"

Scenario: Get a not found exception
When I send a "GET" request to "/dummies/42"
@@ -554,7 +554,7 @@ Feature: Create-Retrieve-Update-Delete
When I add "Content-Type" header equal to "application/ld+json"
And I send a "PUT" request to "/dummies/1"
Then the response status code should be 400
And the JSON node "description" should be equal to "Syntax error"
And the JSON node "detail" should be equal to "Syntax error"

Scenario: Delete a resource
When I send a "DELETE" request to "/dummies/1"
4 changes: 2 additions & 2 deletions features/main/not_exposed.feature
Original file line number Diff line number Diff line change
@@ -171,7 +171,7 @@ Feature: Expose only a collection of objects
When I send a "GET" request to "<uri>"
Then the response status code should be 404
And the response should be in JSON
And the JSON node "description" should be equal to "<description>"
And the JSON node "detail" should be equal to "<description>"
Examples:
| uri | description |
| /tables/12345 | This route does not aim to be called. |
@@ -181,7 +181,7 @@ Feature: Expose only a collection of objects
When I send a "GET" request to "<uri>"
Then the response status code should be 404
And the response should be in JSON
And the JSON node "description" should be equal to "<description>"
And the JSON node "detail" should be equal to "<description>"
Examples:
| uri | description |
| /.well-known/genid/12345 | This route is not exposed on purpose. It generates an IRI for a collection resource without identifier nor item operation. |
10 changes: 5 additions & 5 deletions features/main/relation.feature
Original file line number Diff line number Diff line change
@@ -472,7 +472,7 @@ Feature: Relations support
Then the response status code should be 400
And the response should be in JSON
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
And the JSON node "description" should contain 'Invalid IRI "certainly not an IRI".'
And the JSON node "detail" should contain 'Invalid IRI "certainly not an IRI".'

Scenario: Passing an invalid type to a relation
When I add "Content-Type" header equal to "application/ld+json"
@@ -495,18 +495,18 @@ Feature: Relations support
"type": "string",
"pattern": "^hydra:Error$"
},
"title": {
"hydra:title": {
"type": "string",
"pattern": "^An error occurred$"
},
"description": {
"detail": {
"pattern": "^The type of the \"ApiPlatform\\\\Tests\\\\Fixtures\\\\TestBundle\\\\(Document|Entity)\\\\RelatedDummy\" resource must be \"array\" \\(nested document\\) or \"string\" \\(IRI\\), \"integer\" given.$"
}
},
"required": [
"@type",
"title",
"description"
"hydra:title",
"detail"
]
}
"""
2 changes: 1 addition & 1 deletion features/main/union_intersect_types.feature
Original file line number Diff line number Diff line change
@@ -118,4 +118,4 @@ Feature: Union/Intersect types
Then the response status code should be 400
And the response should be in JSON
And the header "Content-Type" should be equal to "application/problem+json; charset=utf-8"
And the JSON node "description" should be equal to 'Could not denormalize object of type "ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue5452\ActivableInterface", no supporting normalizer found.'
And the JSON node "detail" should be equal to 'Could not denormalize object of type "ApiPlatform\Tests\Fixtures\TestBundle\ApiResource\Issue5452\ActivableInterface", no supporting normalizer found.'
Loading